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 several field values on entity record loaded on this EntityForm.
Arguments
Argument
Type
Description
changes
{ [fieldName: string]: any }
An object defining field changes that has to be done on form entity record.
This example demonstrates how to change several fields on Account record which is currently edited on entity form.
MobileCRM.UI.EntityForm.setFieldValues({primarycontactid: newMobileCRM.Reference("contact",primaryContactId),// lookup field requires Reference objectfax: "555-555-55",// text fieldaddress1_shippingmethodcode: 4,// OptionSet value (UPS shipping)address1_utcoffset: -1,// Whole number field}).then(result=>{if(result){onCompleted();}else{displayError("Unexpected error setting entity record fields.");}}).catch(error=>displayError(`Error setting entity record fields: ${error}`));