CalcAllSave

You can use this function for Optiva workflows.

Purpose

This function runs a CalcAll function against the formula and its sub-formulas and saves it.

Syntax

int CalcAllSave([Optional, DefaultParameterValue(null)] ref string formulaCode)

Return Value

If the code is successful, a value zero (0) is displayed.

Arguments

Parameter Description
formulaCode The formula key on which calculation function is to be executed.

Example

You can call this function against a formula either on its own or at the end of an update to a formula, particularly to values in the Item Lines. This is an example executed from a formula in a Workflow script:

Function wf_start() As Long
    Dim variable As Long = CalcAllSave(_OBJECTKEY)
End Function
CalcAllSave("DOUGH\0001")
Note: If a workflow is executed and user has no access to modify the subformulas, these formulas are not modified.