g_form.showFieldMsg not working in catalog ui policy script

chaithra
Tera Contributor

g_form.showFieldMsg not working in catalog ui policy

find_real_file.png

 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Chaithra,

 

Can you use below

g_form.setValue('select_an_end_date','');

g_form.showFieldMsg('select_an_end_date','Please select future date','error',true);

View solution in original post

16 REPLIES 16

Anurag Tripathi
Mega Patron
Mega Patron

Is the clear Value working?

-Anurag

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Your code looks oke. Is the condition actually triggered at all? Did you debug that?

For some field types, clearValue does not work. Might that be your issue? In that case, use .setValue('select_an_end_date', '') instead.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn