MobileCRM.UI.Form.requestObject - Resconet/JSBridge GitHub Wiki
[v8.0] Requests the currently opened Form object.
Method initiates an asynchronous request which either ends with calling the errorCallback or with calling the callback with Javascript version of Form object. See MobileCRM.Bridge.requestObject for further details.
Argument | Type | Description |
---|---|---|
callback | function(form) | The callback function that is called asynchronously with serialized Form object as argument. Callback should return true to apply changed properties. |
errorCallback | function(errorMsg) | The errorCallback which is called in case of error. |
scope | Object | The scope for callbacks. |
This example demonstrates how to request MobileCRM.UI.Form object and change caption and maximize.
MobileCRM.UI.Form.requestObject(function (form) {
/// <param name='form' type='MobileCRM.UI.Form'/>
form.caption = "Custom caption";
if (form.canMaximize)
form.isMaximized = true;
}, MobileCRM.bridge.alert);