How can I make a field mandatory in list view

joshmorris
Tera Guru

As shown in the screenshot when rejecting a change a comment is forced.

joshmorris_0-1748340141309.png

But when rejecting from this view it is bypassed

joshmorris_1-1748340177941.png

Can anyone help how I can get the field to be filled in?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@joshmorris 

you can use before update business rule and check if value is present or not

if not then stop the record update and throw error message

gs.addErrorMessage('Please fill comments');
current.setAbortAction(true);

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

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@joshmorris 

you can use before update business rule and check if value is present or not

if not then stop the record update and throw error message

gs.addErrorMessage('Please fill comments');
current.setAbortAction(true);

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