Salesforce

How Do I Switch Control to a Different Context? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Switch Control to a Different Context? (Magic xpa 3.x)

When the user is working with interactive contexts, the user can just click on the desired context. However, you can also shift control programmatically, by using the SetContextFocus() function.

The syntax is:

SetContextFocus(<name>)

where:

<name> is the text string that represents the name of the context. You should use a Trim() function around the name to get rid of extra spaces.

After the function executes, the focus will move to the selected context, if it is found.

The function returns TRUE if the context exists and the focus is switched to that context; otherwise it returns FALSE.

See also

The Online Samples project (program MT06)

Reference
Attachment 
Attachment