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 Oct 6, 2025
·
1 revision
[v18.2] Sets the file field content and file name on entity record shown on this EntityForm.
Setting file field content is possible only in offline mode. This method fails in online mode.
Arguments
Argument
Type
Description
fieldName
String
Logical name of the file field that has to be changed.
documentFileName
String
A file name that should be used when presenting the binary content.
documentContent
String
Base64-encoded binary file content.
This example demonstrates how to change the file field which is currently edited on entity form.
MobileCRM.UI.EntityForm.setFileFieldContent("new_document","Sample.txt",btoa("Sample text content...")).then(result=>{if(result){onCompleted();}else{displayError("Unexpected error setting entity record file field.");}}).catch(error=>displayError(`Error setting entity record file field: ${error}`));