Salesforce

How Do I Dynamically Define the Data View Locate? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Dynamically Define the Data View Locate? (Magic xpa 4.x)

You can set up Locate criteria for your users in several ways. Magic xpa has powerful built-in locate abilities, but inexperienced users inadvertently use non-indexed fields and create very slow searches. One way that is easy to implement and also gives you control over what the user can perform a locate on is to use the LocateAdd() and LocateReset() functions.

In this example, two buttons are used to Set and Clear the Locate. The Set button allows the user to enter a value. Then the LocateAdd() function is called to set that value as a Locate. Then View Refresh is raised to refresh the view.

The Clear button does a LocateReset(0), which removes the Locate. Then View Refresh is raised to refresh the view.

The Next button just raises the Internal Locate Next event. This is also available to the end user as a hot key and from the overhead menu (Options->Locate Next, or Ctrl+Shift+L).

See also

The Online and Rich Client Samples projects (program DV14 and RDV14)

Reference
Attachment 
Attachment