Salesforce

How Do I Manually Refresh the View of the Subform? (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Manually Refresh the View of the Subform? (Magic xpa 2.x)

Normally, the Subform control automatically refreshes itself whenever the parameters that are sent to it change. So if, for instance, you have a list of DVD titles in the parent form and display details of each DVD in the subform, the details will change automatically as you scroll through the list. This is usually exactly what you want, and you don’t have to do any work to make it happen.

However, if the record set is large, or the search complex, the refresh might take so much time that it will be bothersome to the user. In this case, you might want to disable the automatic refresh and have it done only when the user clicks a “search” or “refresh” button. Here is how to do it.

Manually refreshing a subform

  1. On your Subform control, set Automatic Refresh to No.

  2. Make sure your Subform control has a control name. Here it is “DVD”.

  1. Create a user event that gets triggered when you want to refresh the subform. In this example we have a push button that raises the user event “Refresh SF”.

  2. In the Logic Editor, create a handler for your event.

  3. In this logic unit, raise the event Subform Refresh.

  4. As an argument to the Subform Refresh event, pass the name of the subform you want to refresh.

Now, your subform will only refresh when the user clicks your refresh button.

See also

The Online and Rich Client Samples projects (program SB02 and RSB02)

Reference
Attachment 
Attachment