How can I make Category Field mandatory on Security Incident Response Form - Only for New Records

WazzaJC
Tera Expert

How can I make the 'Category' Field mandatory on a Security Incident Response Form - Only for New Records

 

Dear ServiceNow Community colleagues, please may I request your help/advice on how to achieve this.

 

I need to ensure the 'Category' field is mandatory on the Security Incident Response Form - but only for New Records.

 

How can I achieve this using a Client Script and what is the Client Script code to use, assuming this is an onLoad Client Script?

 

I am trying this myself, however it seems to be applying the mandatory field setting (to the Category field) even for existing Security Incident Response records.

 

I want to ensure the field is mandatory only when a new Security Incident Response record is raised.

 

Please see attached screenshot of the Security Incident Response form, showing the 'Category' field that I want to make mandatory - only for new Records.

 

Many thanks for any guidance/advice.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@WazzaJC 

no scripting required.

You can achieve this using UI policy

UI Policy Condition: Created [IS EMPTY] (This condition will only satisfy for new record)

UI Policy Action: make field mandatory

AnkurBawiskar_0-1747303470750.png

New Record:

AnkurBawiskar_1-1747303515024.png

 

Existing Record:

AnkurBawiskar_2-1747303556847.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@WazzaJC 

no scripting required.

You can achieve this using UI policy

UI Policy Condition: Created [IS EMPTY] (This condition will only satisfy for new record)

UI Policy Action: make field mandatory

AnkurBawiskar_0-1747303470750.png

New Record:

AnkurBawiskar_1-1747303515024.png

 

Existing Record:

AnkurBawiskar_2-1747303556847.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks very much Ankur - I have used this approach successfully, I appreciate your help as always.

Glad to help.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader