You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rescocrm edited this page Feb 10, 2025
·
1 revision
[v18.0] Sets the field value on entity record shown on this EntityForm.
Arguments
Argument
Type
Description
fieldName
String
Logical name of the field that has to be changed.
value
any
New value of entity field with given name.
This example demonstrates how to change the "Company Name" field on Contact record which is currently edited on entity form.
MobileCRM.UI.EntityForm.setFieldValue("parentcustomerid",newMobileCRM.Reference("account",companyId))// lookup field requires Reference object.then(result=>{if(result){onCompleted();}else{displayError("Unexpected error setting company name field.");}}).catch(error=>displayError(`Error setting entity company name field: ${error}`));