- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Are you having problems with your Mobile UI policies, maybe you have some fields showing that should be hidden or maybe one of your read-only fields is editable? This is where troubleshooting your mobile UI policies will come in handy. UI Policies are rules that apply to forms that dynamically change form information or the form itself. These are great becasue they allow you to add controls without having to write any scripts.
We use UI Policies to set fields on a form to:
- Optional or Mandatory
- Visible or Hidden
- Editable or Read-only
When troubleshooting your Mobile UI Policies there are 3 plans of action we recommend you take:
- Confirm UI Policy scripts are set to run in the mobile UI
- Make sure any client side scripts are compliant with the mobile UI
- Make sure any other element aren't causing the change
Confirm your scripts are running in the Mobile UI
The Run Scripts in UI Type field was added to UI Policy records when the Mobile UI was launched and it provides the options: Desktop, Mobile, or both. But you probably won't automatically see this field because it isn't defaulted to appear on the UI policy form so you'll need to configure your form by:
- Right-click the form header and select the appropriate option for your version:
- Fuji or later: Configure > Form Layout
- Eureka or earlier: Personalize > Form Layout
- Using the slushbucket, select the Run Scripts in UI Type from the available box and add it to the Selected box
- Click Save
- Select the UI Policy record
- Change the Run Scripts in UI Type to either Mobile or Both
Confirm client side script is compliant with the Mobile UI
Because there are many limitations in the mobile interface, you may be required to make changes to any custom scripts. Scripts using asynchronous calls or unsupported methods may break down, and prevent forms from working the way you intended. This is important for scripts within your UI Policies as well as any other client side scripts that execute on the same form. When client side errors are triggered on a form, scripts stop executing. So if there's a faulty client script executing on the form before your UI policy, then it can potentially stop your UI policies from running.
You should Debug the Mobile UI from your desktop to make sure the client side scripts are compliant with the mobile user interface and to track down any errors is using you browser's developer console
Make sure other elements aren't causing changes
UI Polices are the recommended method to make a field mandatory, visible and conditionally read only but these aren't the only way to control this. Client scripts execute before UI policies so they should override these calls, which can explain why a field is invisible after you've disabled a UI policy that hides it.
Check the client scripts running on the form for any:
- setVisible
- setMandatory
- setReadOnly
These might be conflicting with your policies. It should also be noted that a field could be made mandatory at the dictionary level by using the checkbox on the field's dictionary entry. Also be aware we have a known error related to this if this step still isn't working for you see [Mobile UI] UI Policy executes before client scripts.
Hopefully one of these steps will helps you identify what is causing your UI Policies errors in the Mobile UI. If you need more information refer to the Smartphone Interface and Creating UI Policies pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
