-
Notifications
You must be signed in to change notification settings - Fork 24
MobileCRM.Platform.openDocument
rescocrm edited this page May 15, 2023
·
10 revisions
[v8.1] Opens specified document in associated program.
Apple security policy doesn&t allow this functionality on iOS.
| Argument | Type | Description |
|---|---|---|
| path | String | A path to the document file. |
| mimeType | String | Document MIME type (required on Android). |
| args | String | Optional arguments for Windows 7 command line. |
| errorCallback | function(errorMsg) | The errorCallback which is called asynchronously in case of error. |
| scope | Object | The scope for errorCallback. |
This example demonstrates how to open a document in associated program.
var documentPath = "c:\\Desktop\\test.txt";
MobileCRM.Platform.openDocument(documentPath, "text/plain", null, MobileCRM.bridge.alert, null);This example demonstrates how to open a document in explicitly specified program using command line arguments (Windows only!).
var documentPath = "c:\\Desktop\\test.txt";
var notePad = "c:\\windows\\system32\\notepad.exe";
MobileCRM.Platform.openDocument(notePad, "text/plain", documentPath, MobileCRM.bridge.alert, null);