Article Details
Id:18841
Product:finPOWER Connect
Type:NEW
Version:3.04.03
Opened:03/12/2021
Closed:07/12/2021
Released:01/02/2022
Job: J027957

finAccountProcesses; updated Business Layer help for Clear function

The Business Layer help for the finAccountProcesses.Clear function has been updated with more information.

Normally the finAccountProcesses object is initialised ready to run all Accounts and options.

However, where you want to run for one particular Account only in a script, you should pass in the parameter "optionsAllFalse" as True. This forces all options (with one exception) to False and means, for example, that Quotation Credit Enquiries aren't confirmed. It is very important to do this as it ensures future compatibility - if a new option is added it will be turned off.

The exception is "WorkflowsProcess" is not set to False - so you should do this immediately after calling Clear(True). This is to maintain backwards compatibility.

In addition - remember that Account codes could include a dash. So, you must adjust the Account code to cater for this, otherwise, if you pass in a code such as "1-900" you might get unexpected results.

The code snippet below demonstrates this:

AccountProcesses = finBL.CreateAccountProcesses
With AccountProcesses
  ' Clear, setting all options to False for future compatibility - WorkflowsProcess must be specifically cleared
  .Clear(True)
  .WorkflowsProcess = False

  ' Set Account Range - note adjust for wildcard ranges just in case a code includes a dash
  .RangeAccounts = finBL.Runtime.TextUtilities.RangeAdjust(Account.AccountId)

  ' Adjust other Parameters as necessary
End With