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 May 15, 2023
·
8 revisions
Asynchronously writes the base64-encoded data into the application local storage file.
Arguments
Argument
Type
Description
path
String
Defines the relative path of the file in the application local data.
base64
String
A string containing the base64-encoded file content.
success
function()
A callback function which is called in case of success.
failed
function(error)
A callback function for command failure. The error argument will carry the error message.
scope
A scope for calling the callbacks; set "null" to call the callbacks in global scope.
This example demonstrates how to store the image data into application storage root and show it in <img> element using relative URL.
functionsaveAndShowImage(base64ImageData){/// <param name="base64ImageData" type="String">String containing base64-encoded image data.</param>MobileCRM.Application.writeFileFromBase64("ExternalImage.jpg",base64ImageData,function(){varimgElement=document.getElementById("test-image");imgElement.src="../ExternalImage.jpg";// Offline HTML is opened from the WWW folder and image was stored into the root folder},MobileCRM.bridge.alert);}