Salesforce

View Refresh (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

View Refresh (Magic xpa 4.x)

The View Refresh event re-reads the task data view.

This event has two optional parameters:

Relocate mode – Determines the record that the engine parks on when the view is refreshed. You can select one of the following options:

0 – Relocate on the last parked record. The mode will be 0 if no argument is passed or if the value passed is anything other than 1 or 2. This is the default value.

1 – Relocate according to the task locate criteria.

2 – Do not locate a record. Park on the first record of the new view.

Keep user sort – This parameter enables you to perform a View Refresh while keeping the user sort. It determines whether the data will be re-sorted according to the user sort criteria (such as the column that the user clicked on), or the sort defined in the program (such as the index). Since version: 1.5

When using Direct SQL:

  • Relocate Mode = 0 will not relocate on the last parked record, since there is no position for the records being shown.

  • Keep user sort is not supported.

First, the current record cycle is completed (as occurs in the Record Flush internal event). Next, the data view is created based on the current data view definition (Range, Locate and Sort). You should use this event when you want to refresh the data view completely. Magic xpa will try to keep the cursor on the same current record.

When using these internal events, if the Get Definition phase fails, the "Record is no longer in view" error will be displayed and the next row will be fetched from the database (based on the data view definition). The Get Current operation may fail either because another database user deletes the record (row) or modifies the position information.

Tree Refresh

When View Refresh is executed in a task with a Tree control, the state of each node is kept and only nodes that are already loaded can be refreshed. This internal event is usually required to reflect the modification of the tree structure. Using View Refresh in a task with a Tree control, where the engine relocates to a modified node according to the task locate criteria can be achieved only if the located node is already loaded.

In Rich Client tasks, when a View Refresh event is raised in a task with a Tree control, the tree will be refreshed and shown as it was when the task was opened according, for example, to the Node Preload and Auto Expand properties. However, the current state of expansion is not kept.

Subform Refresh

In Rich Client tasks, when a View Refresh event is raised in a task with a Subform control, the subform will also be refreshed.

No default Keyboard Mapping

Related Topics

Data Refresh Events

The Online and Rich Client Samples projects (program DV18 and RDV18)

Reference
Attachment 
Attachment