Override Mandatory on draft state

Gary Larsen
Mega Sage

I have several mandatory fields on change request, and I need to allow save as draft without all of them filled 

1 ACCEPTED SOLUTION

jaheerhattiwale
Mega Sage
Mega Sage

@Gary Larsen Create a new UI Policy

 

Set the filter as State = Drfat

jaheerhattiwale_0-1670408069102.png

 

Write in "Execute if true" script : g_form.checkMandatory = false;

Write in "Execute if false" script : g_form.checkMandatory = true;

 

jaheerhattiwale_1-1670408158325.png

 

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

View solution in original post

7 REPLIES 7

jaheerhattiwale
Mega Sage
Mega Sage

@Gary Larsen Create a new UI Policy

 

Set the filter as State = Drfat

jaheerhattiwale_0-1670408069102.png

 

Write in "Execute if true" script : g_form.checkMandatory = false;

Write in "Execute if false" script : g_form.checkMandatory = true;

 

jaheerhattiwale_1-1670408158325.png

 

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

Works great Thank You

šŸ‘

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023