Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Field is highlighted as mandatory while it is no longer mandatory - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Field is highlighted as mandatory while it is no longer mandatory
KB0564442

Field is highlighted as mandatory while it is no longer mandatory


3812 Views Last updated : Oct 17, 2023 public Copy Permalink
KB Summary by Now Assist

Description

When there is a UI policy for setting a field as mandatory, the field is highlighted with a red border during submit even though the mandatory condition is no longer applicable. If the policy condition matches, then the fields are mandatory and everything is fine. If the condition does not match during form submit, the non-mandatory fields are still showing as highlighted with a red border.

Steps to Reproduce

  1. Create two UI policies that set a field mandatory:
    • create a UI policy with condition state=3^EQ (Pending Change) and add action to set Description field to mandatory
    • create a UI policy without any condition and add action to set KB0547253 field to mandatory
  2. Navigate to problem.do.
  3. Set the State field to Pending Change.
    Now there are two different mandatory fields.
  4. Set the State field to something else (for example, Open).
  5. Click Submit.
    See the red border on the Description field with message that only the Short description is mandatory.

     

 

Workaround

As a workaround, add the following styling code that reverts the border color to the original grey in the affected UI Policy condition:

field.style.borderColor = 'rgb(189,192,196)';


Related Problem: PRB639495

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.