MobileCRM.DynamicEntity.loadFileFieldContent - Resconet/JSBridge GitHub Wiki
Arguments
Argument | Type | Description |
---|---|---|
entityName | String | Logical name of entity containing the file field. |
id | String | An ID of record containing the file field. |
fileFieldName | String | Logical name of the file field. |
This example demonstrates how to load the file field content. Following snippet loads the file field content (either local or online copy - depending on app online mode), unpacks base64 data, and sets the text content to HtmlElement.
MobileCRM.DynamicEntity.loadFileFieldContent(entity.entityName, entity.id, "new_document")
.then(data => resultP.innerText = atob(data))
.catch(error => resultP.innerText = error);