synchronizeAssociatedModels() |
It triggers a request to the backend and synchronizes the data for all associated models. Data will be synchronized according to the current active business object of the current model.
Syntax
Script |
modelID.synchronizeAssociatedModels(unconditional) |
Parameters
Parameter |
Description |
---|---|
unconditional |
This parameter is optional. Takes boolean value that denotes whether synchronization should happen unconditionally. When set to true, request will be activated even if the associated model already points to data in the current model. The default value is false. |
Return Value
No value is returned.
Remarks
This method can be used when:
- Associated model is not automatic and the developer decides when to synchronize to the current model and fire accordingly.
- Developer wishes to retrieve the data on demand that is data is updated by some other user, and developer wishes to update the status of data.
Sample Code
This sample code demonstrates how the method can be used.
// This method call synchronizes all associated models of the //Employees model unconditionally, thus retrieving data //irrespective of the current status of the associated models. function employeeid_Change(eventObject) { EmployeesModel.synchronizeAssociatedModels(true); }