OnSyncView - cWebWindow

Called for each server call that is received

Type: Event

Parameters: None

Syntax
Procedure OnSyncView 

Description

For each server call that is received, the active view (or dialog) will receive the OnSyncView event. This is received after the view's DataDictionary objects (DDOs) have been synchronized, the DDO constraints re-established and the web property values are synchronized but before the call action is executed.

OnSyncView is called after the DDOs are synchronized, which means you would not normally use this to change your constraints (although you could, but you'd probably need to Refind_Records again). During the request sync process, the current records are refound for the DDOs. Before that happens, the web properties are synchronized followed by Rebuild_Constraints being sent to all DDOs. Therefore, Rebuild_Constraints can use web properties directly to customize constraints for the request. If needed, you could check the AppSynching function to handle any constraint rebuilding that must occur with each app-synching request.

The reason for this order is that the constraints must be rebuilt before you can refind the records for the DDOs. That requires that the web properties must first be synchronized. After all of that has happened, you can do any final processing in OnSyncView. At that point, your DDOs, data entry objects (DEOs) and web properties are completely up to date for the view.

You can augment this event to perform any additional synchronization of data required by the view. For example: you may need to reestablish secure data that is stored in some location on the server.