new MobileObject()
Class that represents an object returned by a custom code API.
Class that represents an object returned by a custom code API.
Methods
-
delete(deleteIfOffline)
Saves any changes to the object back to the service.
-
Saves any changes to the object back to the service.
Parameters:
Name Type Description deleteIfOffline
Boolean If true will cache the delete locally and sync back to the service if the device is offline; if false will fail if the device is offline. Returns:
- Type
- Promise.<(Undefined|NetworkResponse)>
-
save(saveIfOffline)
Saves any changes to the object back to the service.
-
Saves any changes to the object back to the service.
Parameters:
Name Type Description saveIfOffline
Boolean If true will cache updates locally and sync them back to the service if the device is offline; if false will fail if the device is offline. Returns:
- Type
- Promise.<(MobileObject|NetworkResponse)>