g_form.showFieldMsg and g_form.showErrorBox not working.

Sriraj V
Tera Contributor

Hi Team,

I am unable to see the field message or error box under my variable, am i doing anything wrong.

  1. g_form.addErrorMessage('Please select a valid date. Start Date cannot be before today'); is executing and able to see the message at the top of the form.
  2. g_form.showFieldMsg & g_form.showErrorBox is not showing any message in both native and esc portal. 

SrirajV_0-1737611901564.png

 

Thank You in advance,
Sri

13 REPLIES 13

Ankur Bawiskar
Tera Patron
Tera Patron

@Sriraj V 

syntax for both is correct

don't use both, use either field message or error box

Also in your script clear value syntax is wrong

it should be g_form.clearValue('start_date');

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

@Sriraj V 

Thank you for marking my response as helpful.

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

@Sriraj V 

Hope you are doing good.

Did my reply answer your question?

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Sriraj V 

error box I believe doesn't work in portal.

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