How to Display g_form.addErrorMessage() Permanently in ServiceNow.

zee15
Tera Contributor

Hi,

I have a requirement where an error message added using g_form.addErrorMessage() needs to be displayed permanently on the form.

Currently, I am adding the error message through a client script. The message appears initially, but after some time it automatically disappears. I understand that this is the out-of-box (OOB) behavior in ServiceNow.

Is there a way to override this behavior and make the error message persist on the form? If so, I would appreciate any guidance or best practices to achieve this.

Thanks in advance for your help.

10 REPLIES 10

Ankur Bawiskar
Tera Patron

@zee15 

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

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