Salesforce

How Do I Execute Task Prefix/Suffix Logic of a Subform Whenever the Subform Is Refreshed? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Execute Task Prefix/Suffix Logic of a Subform Whenever the Subform Is Refreshed? (Magic xpa 3.x)

Task prefix executes whenever a task starts, and task suffix executes whenever the task ends. However, in a subform, you can have a Block operation within the task logic unit that executes depending on how the subform was entered. This is done using the SubformExecMode() function.

If the subform task was executed during a refresh operation, such as an automatic refresh or a manual SubformRefresh action, then SubformExecMode(0) will return 2. So using

SubformExecMode(0) = 2

as the condition on the block will cause the block to only execute when the subform is refreshed.

Coding a block that only executes when the subform is refreshed

  1. Open up a line in the logic unit you are modifying (F4 or Edit->Create Line).

  2. Select the Block operation by typing B or by using the pulldown list.

  3. Two lines will open up, a Block If and a Block End. Tab to or click on the field after the If.

  4. Zoom (F5, double click) to the expression rules. Enter the expression:

SubformExecMode(0)=2

  1. Press Enter to select the expression and bring back the expression number.

Now the block will only execute when the subform is refreshed.

See also

The Online Samples project (program SB09)

Reference
Attachment 
Attachment