Can I use g_form.clearMessages() function on a scoped Service Portal Application, under the client script?

juanlopez
Kilo Contributor

Can I use g_form.clearMessages() function on a scoped Service Portal Application, under the client script?

3 REPLIES 3

Patrick Fedigan
Giga Guru

shawna
Tera Guru

g_form should be supported for scoped application. 

Refer to this thread and might be try g_form.hideFieldMsg

 

https://community.servicenow.com/community?id=community_question&sys_id=9b08c36ddb1cdbc01dcaf3231f96...

Elczar Adame1
Tera Expert

Yes.

The GlideForm API provides methods to customize forms. GlideForm.js is the JavaScript class containing the methods. The global object g_form is used to access GlideForm methods. GlideForm methods are only used on the client.

The g_form.clearMessages() method removes all informational and error messages from the top of the form. It removes informational and error messages added with g_form.addInfoMessage() andg_form.addErrorMessage().

Reference: https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/GlideForm/concept/c_GlideFormAPI.html