Salesforce

How Do I Exit a Program from a Subtask Level? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Exit a Program from a Subtask Level? (Magic xpa 3.x)

Very often, you will have a stack of related tasks running together. Sometimes these tasks even look like one screen, so when the user presses an Exit button, they expect the entire stack of tasks to exit.

The best way to do this is to use your event handler as shown below.

Allowing an Exit event to propagate

Here we have Task A and Task B. When you click on the Close button in Task A, what normally will happen is that it closes both tasks. But when you close Task B, it will close Task B and control will revert to Task A.

So, how do we make closing Task B also close Task A?

  1. First, make the close button raise an Exit event. This is the same event that gets raised if the user clicks on the X or presses Esc, so we cover all the bases that way.

  2. Next, create a handler that is triggered by the Exit event. The handler will be triggered by Exit, but will also allow it to propagate, which will close Task B.

  3. In the handler, raise another event, again, an Exit event. This event will then close Task A.

While we showed two separate tasks here for clarity, this would ordinarily be used when Task B is a subform task of Task A.

See also

Reference
Attachment 
Attachment