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.