Troubleshooting Mobile UI Policy IssuesIssue This article discusses the various things to check when you are troubleshooting UI policies on the mobile user interface. Procedure Ensure UI Policy Scripts are Set to Run in the Mobile UI With the introduction of the Mobile UI, a new field has been added to UI Policy records called Run scripts in UI type. The options for this field are Desktop, Mobile, or Both. This field does not appear on the UI Policy form or list by default, but can be added using the steps provided in the mobile product documentation. This field determines whether or not the scripts in the Execute if true or Execute if false fields is run. It does not have an effect on whether or not a UI Policy’s actions are run. Make Sure Any Client Side Script is Compliant with the Mobile UI There are some limitations in the Mobile UI that may require changes in any custom-created scripts, or scripts that have been modified from their base system versions. Scripts that use asynchronous calls or unsupported methods may break down, and prevent your forms from working the way you intend. 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. Faulty client scripts running on the form before your UI Policy can potentially stop your UI Policies from running, even when there is nothing wrong with the policies themselves. The best way to track down any client-side errors is by using your browser’s developer console. Further information on this can be found in the Debugging the Mobile UI from your Desktop community article. Make Sure Other Elements are not Causing Changes While UI Policies are the recommended method to make a field mandatory and visible, and conditionally read-only, there are other ways to do this. Check client scripts running on the form for any setVisible, setMandatory, and setReadOnly calls, as these might be conflicting with your policies. Also, note that a field can be made mandatory at the dictionary level, using a checkbox on the field’s dictionary entry. Client Scripts execute before UI Policies, so they should override these calls, but this can explain, for example, why a field is invisible after you’ve disabled a UI Policy that hides it.