Article Details
Id:20128
Product:finPOWER Connect
Type:NEW
Version:4.00.02
Opened:26/10/2022
Closed:29/03/2023
Released:27/06/2023
Job: J029907

Account Monitor Category Change; Cancel now supports scripting

Changes have been made to Account Monitor Category Change functionality, mainly so that the Cancel function supports scripting.

The finAccountMonitorCategoryChange object now includes a new function ExecuteCancel that takes a parameter accountHistoryPk that defines the Primary Key of the Account History item to cancel. This function will:

  • Run script events as described below.
  • Validate the data passed to the object.
  • Cancel the Monitor Category change, including updating the Account's Next Process and Backdated To dates.
  • Add an Audit Log to the Account.
    • Reference property can be set and will be audited.
  • Add an Account Log if the LogCreate property is True.

NOTE: The finAccountFunctions.AccountHistoryMonitorCategoryCancel function will continue to work, but now uses the finAccountMonitorCategoryChange object to handle the cancel. This means all the scripting events will be executed. You should consider using the finAccountMonitorCategoryChange object instead of this function.

The following new events are supported in an "Object Event", "AccountMonitorCategoryChange" type script.

  • ExecuteCancelPre
    • Runs at the start of ExecuteCancel
    • Return False to cancel
  • ExecuteCancelPreInTransaction
    • Runs during ExecuteCancel, after a Database Transaction has begun but before any work has started
    • Return False to cancel
  • ExecuteCancelPostInTransaction
    • Runs during ExecuteCancel, after work has been completed but before the Database Transaction is committed
    • Use to implement additional functionality that must be part of the overall Cancel
  • ExecuteCancelPost
    • Runs at the end of ExecuteCancel
    • Since the Database Transaction is complete use with caution. Any failure here will not affect the overall Cancel