Access the native features of the device using the native device functions.
Method | Description |
---|---|
setScreenTitle(screenKey, screenTitle) | Sets the specified screen’s title
based on its sup_screen_title attribute value.
|
closeWorkflow() | Closes the Mobile Workflow application. |
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.
|
removeAllMenuItems() | Removes all native menu
items. Note: Removes all
menu items from the current screen. On iOS devices, all the menu
buttons on the header and footer bars are removed. On Blackberry
and Android devices, all native menus are removed. It is
recommended that this method be called from
customAfterShowScreen.
|
clearCache() | Allows the user to clear the contents of the on-device request result cache for the current workflow. |
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.
|
logToWorkflow(message, level, notifyUser) | Allows the user to log a message
to the device trace log, which can be remotely retrieved from the server.
|
showCertificatePicker() | Opens a form on the device that allows the user to specify the credentials through the use of certificate-based authentication. |
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> |
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.
|
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.
|
showLocalAttachment(key) | Shows a local attachment. key – the key. |
doOnlineRequest(screenKey, requestAction, timeout, cacheTimeout, errorMessage, errorCallback, workflowMessageToSend, cacheKey) | Allows the user to cause an
operation/object query to be invoked.
|
doAttachmentDownload(screenKey, requestAction, workflowMessageToSend, attachmentKey, requestGUID, downloadCompleteCallback) |
|
doSubmitWorkflow(screenKey, requestAction, submitMessage, resubmitMessage) | Allows the user to cause an
operation/object query to be invoked. Will close the workflow
application when finished.
|
showAlertDialog(message, title) | Brings up a message dialog with the specified message, or, optionally, on iOS only, the specified title. |
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; }