1525 views

Determining if your UI policy is disabled

 

Problem

Disabled or higher precedence UI policies.
 

 

Symptoms


  • Cannot change field
  • UI policy not working
  • UI action not working
  • Client scripts not working
  • Fields not visible
  • Mandatory field not working 
 
Cause

  • The UI policy settings, including the active flag and the global settings, may not be properly configured. 
  • Other UI policies with a higher priority may be specified that affect the same field.  

 

Resolution

The active flag in the UI policy must be set to true and apply to all relevant forms. The UI policy also must be marked as global to ensure that the settings apply to all forms. If global is not checked, the UI policy only applys to the view that is specified in the View field. If no view value is shown, then the settings apply to the Default view (in the event that global is not checked) and not all forms.

If other UI policies that affect the same field have a higher Order field value than the UI policy you are troubleshooting, then they take precedence. One good way way to see if there are other UI policies that affect the same field is to search the sys_ui_policy action table. This table contains the UI policy actions that are tied to particular UI policies. These are the records that determine which fields are mandatory, visible, or read-only. 

For example, if you are trying to set the caller_id field to mandatory in an incident with a UI policy, you can check all the UI policy actions for that field as follows:

  1. Go to the sys_ui_policy_action table list of records. The URL for this would be something like: https://myinstance.service-now.com/sys_ui_policy_action_list.do?sysparm_query=
  2. Filter the breadcrumbs as follows:

    Table is incident
    and
    Field name is caller_id

  3. Once executed, the resulting list shows you all the UI policy records for that table/field combination.
    • If more than one result is returned, click the UI policy value in each column and make note of the order. Policies with the highest order take precedence over lower ones. Make sure the UI policy you want to fire last has the highest order or consolidate the UI policies that are affecting the same field into a single one.

    • If no results are returned when you search the UI policy actions table, keep in mind that UI policies also have script fields that can cause the behavior you are seeing. Like the example with incident and caller_id, you can check for this as follows:

      1. Go to UI policies (sys_ui_policy).
      2. Filter the breadcrumbs as follows:

        Table is incident
        and
        Execute if false contains caller_id
        or
        Execute if true contains caller_id

      3. If any results are returned, review the script fields to see how they could be affecting your field.

 

Article Information

Last Updated:2015-02-12 16:16:00
Published:2015-01-26