Salesforce

How Do I Retrieve the Name of the Control the User Clicked On? (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Retrieve the Name of the Control the User Clicked On? (Magic xpa 2.x)

It is often useful to know where the user last clicked. This is different from where the user last parked, because some controls, such as push buttons, may not be parkable.

LastClicked()

Prerequisite: The control must have a control name, or nothing will be returned.

You retrieve the value of the last control the user clicked on with the function LastClicked(). There are no parameters. It returns a string that represents the control name. That string can then be passed to other functions and expressions that test for the control name.

Note: If you are trying to execute some code based on which control the user clicked on, you can also do this by adding the “On” field to the Click event. For instance, in the example above, we could code the Event as:

Then that logic unit would only execute if the View Details control was clicked.

See also

The Online and Rich Client Samples projects (program EL13 and REL13)

Reference
Attachment 
Attachment