You are here:
Helpful Commands for the Console Window
These console commands are helpful for debugging your customizations.
Required Editions
| Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled |
Data flows from the data source to the various objects—Business Object, List Object or Lookup Object—to the process, and finally to the UI. To debug an issue, the user must move in the opposite direction—from the UI to the data source. There are two threads: the UI and the framework. To debug the framework (App), you must select the thread as Engine.
| Function | Description |
|---|---|
| Framework.getProcessContext(): | Returns the current state of the app by specifying the process that’s running (the modeled process in a process contract), the UI used (modeled UI in a UI contract), the objects in the process, and the data loaded with their state. |
| Framework.getProcessContext().__spec.name: | Returns the name of the current process in use. |
| Framework.getProcessContext().__attachedUI: | Returns the name of the current UI in use. |
| ApplicationContext.get('user'): | Returns the user in context. Shows the business object—BoUser—for the app user. Contracts load the Bo and put the BoUser information into ApplicationContext. ApplicationContext acts as a cache for the currently running app. |
| ApplicationContext.get('user')._roles: | Returns the roles of the current user. |
| AppManager.sysToggles(): | Returns the list of toggles or picklists available in the framework. Picklists on the platform are defined on dedicated fields. In the offline mobile app, picklists aren’t defined on dedicated fields but use platform metadata. You must define a mapping for the platform picklist to the mobile picklist. Use this command to ensure that the picklist mapping reaches the mobile device correctly. |
Did this article solve your issue?
Let us know so we can improve!

