Article Details
Id:13463
Product:finPOWER Connect
Type:NEW
Version:2.03.04
Opened:30/11/2015
Closed:30/11/2015
Released:03/02/2016
Job: J016627

Cancel Disbursements; new Business Layer object and scripting events added

Disbursements now include a new object and script events for use when cancelling Disbursements.

It is now possible to create an AccountDisbursementCancel object via finBL.CreateAccountDisbursementCancel() and use this to cancel Disbursements.

Note, the current finBL.AccountFunctions.DisbursementCancel function still operates exactly the same, and the same script events fire.

A script of type "Object Events", object "AccountDisbursementCancel" should be created to handle Disbursement Cancel events. After a script has been created, it must be configured under Global Settings, Accounts, Scripts page, "AccountDisbursementCancel" event script.

The script can handle four events:

ExecuteCommitPre
Runs at the start of ExecuteCommit and can be used to validate and tweak values. Return False, with an error message, to cancel the Commit.

ExecuteCommitPreInTransaction
Runs during ExecuteCommit, after a Database Transaction has begun but before any work has started. It can be used much like the ExecuteCommitPre event, but because it is in a Database Transaction must not be used to interact with the user.

ExecuteCommitPostInTransaction
Runs during ExecuteCommit, after work has been completed but before the Database Transaction is committed. Use to implement additional functionality that must be part of the overall Commit.

ExecuteCommitPost
Runs at the end of ExecuteCommit. Since the Database Transaction is complete use with caution. Any failure here will not affect the overall Commit.