Access the native features of the device using the native device functions.
Method | Description | Synchronous or Asynchronous |
---|---|---|
setScreenTitle(screenKey, screenTitle) | Sets the specified screen’s title based on its sup_screen_title attribute value.
|
Asynchronous on iOS Synchronous on BlackBerry and Windows Mobile |
closeWorkflow() | Closes the Mobile Workflow application. | Asynchronous on iOS Synchronous on BlackBerry and Windows Mobile |
addMenuItem(menuItemName, functionName, subMenuName, screenToShow) | Allows the user to add a native menu item with the specified name and with the specified callback, which is invoked when the menu item is clicked.
|
Synchronous |
removeAllMenuItems() | Removes all native menu items. | Asynchronous on iOS Synchronous on BlackBerry and Windows Mobile |
clearCache() | Allows the user to clear the contents of the on-device request result cache for the current workflow. | Synchronous |
clearCacheItem(cacheKey) | Allows the user to clear an item from the contents of the on-device request result cache for the current Mobile Workflow form. cacheKey – the key for the item to be removed. See the Workflow.js file for details on how to construct this. Note: This function is for the "Online Request" cache only and does not apply to cached credentials.
|
Synchronous |
logToWorkflow(message, level, notifyUser) | Allows the user to log a message to the device trace log, which can be remotely retrieved from the server.
|
Synchronous |
showCertificatePicker() | Opens a form on the device that allows the user to specify the credentials through the use of certificate-based authentication. | Asynchronous on iOS Synchronous on BlackBerry and Windows Mobile |
showUrlInBrowser(url) | Open the supplied URL in the browser.
Use this method only for opening external HTML files. To open a local HTML file, you must add an HtmlView control to the screen and use something similar to the following for the control's value:
<iframe src="./local_file_name.html" width="100%" height="80%"> <p>Your browser does not support iframes.</p> </iframe> |
Asynchronous on iOS Synchronous on BlackBerry and Windows Mobile |
showAttachmentContents(contents, mimeType, fileName) | Shows the given file contents in a content-appropriate way. The content type is supplied by either the MIME type or the file name, at least one of which must be supplied. The content itself should be presented as a Base64-encoded string.
|
Synchronous on Windows Mobile Asynchronous on iOS and BlackBerry |
showAttachmentFromCache(uniqueKey, mimeType, fileName) | Shows the given file contents in a content-appropriate way. The content type is supplied by either the MIME type or the file name, at least one of which must be supplied. The content itself is a unique key supplied earlier to a call to doOnlineRequest.
|
Synchronous on Windows Mobile Asynchronous on iOS and BlackBerry |
showLocalAttachment(key) | Shows a local attachment. key – the key. |
Asynchronous on iOS Synchronous on BlackBerry and Windows Mobile |
doOnlineRequest(screenKey, requestAction, timeout, cacheTimeout, errorMessage, errorCallback, workflowMessageToSend, cacheKey) | Allows the user to cause an operation/object query to be invoked.
|
Synchronous on Windows Mobile Asynchronous on iOS and BlackBerry |
doAttachmentDownload(screenKey, requestAction, workflowMessageToSend, attachmentKey, requestGUID, downloadCompleteCallback) |
|
Asynchronous |
doSubmitWorkflow(screenKey, requestAction, submitMessage, resubmitMessage) | Allows the user to cause an operation/object query to be invoked. Will close the workflow application when finished.
|
Synchronous |
showAlertDialog(message, title) | Brings up a message dialog with the specified message, or, optionally, on iOS only, the specified title. | Asynchronous |
showConfirmDialog(message, title) | Shows a confirmation dialog. |
<html> <body> <b>Welcome to Sybase Mobile Workflow</b><br> <br>Your activation was successful, the newly created Workflow requests will automatically be pushed to you.<br> <br>For more information contact your administrator or visit us at:<br> <br> <a href="javascript:showUrlInBrowser('http://www.sybase.com/ unwiredenterprise')">The Unwired Enterprise</a> </body> </html>
if (screen === "ScreenKeyName" && menuItem === "ShowAttachment") { showLocalAttachment("html/images/ipod.jpg"); return false; }