Using JSDOs to create mobile and web clients : JSDO overview : Asynchronous and synchronous execution : Managing JSDO event subscriptions
  
Managing JSDO event subscriptions
You can subscribe event handlers to JSDO events using either the subscribe( ) method on the JSDO or by setting appropriate properties in an initialization object that you can pass to the constructor used to instantiate the JSDO. If you use the subscribe( ) method after the JSDO is instantiated and its JSDO memory has been loaded with records, you can also subscribe to events for the Data Object Create, Update, and Delete (CUD) operations that either execute for a specific table reference or for all table references of the JSDO.
When you subscribe an event handler function to a JSDO event, the parameter list for the function must match the parameter list defined for the event. However, all JSDO event handlers receive a reference to the JSDO as its first parameter and a reference to a request object as its last parameter that contains event results (see the following section). All handlers for after* events receive a boolean parameter that indicates the success of the Data Object operation (or operations for afterSaveChanges without Submit). All handlers for events fired by Data Object CUD operations receive a JSRecord object parameter that represents the record object in JSDO memory that is created, updated, or deleted. For more information on the required parameter list for each event, see the reference entry for the event in JSDO properties, methods, and events reference.
Regardless of how you subscribe event handlers to an event, you can remove an event subscription for one or more an event handlers using the unsubscribe( ) or unsubscribeAll( ) method. If an event has no event handler subscribed and the event fires, it returns no results to the app.