Salesforce

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

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Execute the Task Prefix/Suffix Logic of a Subform Whenever the User Enters the Subform? (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 entered by a user action, such as tabbing into the subform or clicking on it, then SubformExecMode(0) will return 0. So using

SubformExecMode(0) = 0

as the condition on the block will cause the block to only execute when the user enters the subform.

Coding a block that only executes when the user enters the subform

  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)=0

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

Now the block will only execute if the user enters the subform.

See also

The Online Samples project (program SB08)

Reference
Attachment 
Attachment