In OnLoad Client script, why fieldname is showing as mandatory?

Sathwik1
Tera Expert

In OnLoad Client script, why fieldname is showing as mandatory? is it expected?

Sathwik1_0-1769669824261.png

@Ankur Bawiskar 

 

6 REPLIES 6

rakeshgadda
Tera Contributor

I believe you changed an onChange client script to onLoad, just try to create a new Client script

Ankur Bawiskar
Tera Patron

@Sathwik1 

Would you mind closing your earlier questions by marking the appropriate response as the accepted answer? Members have invested their time and effort to help you, and acknowledging the correct response allows them to receive due credit.

How to show mandatory fields on the pop-up when we clicked on UI Action? 

Hardware entitlement backend table name? 

In Agent Workspace, By Default I'm seeing "show alerts" it means why default it was hiding why so? 

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

Dr Atul G- LNG
Tera Patron

Hi @Sathwik1 

look like some customisation in your instance, filed name should not visible on load script.

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

@Dr Atul G- LNG 

FYI

-> onLoad runs when form loads and has no dependency with Field name, hence it doesn't require Field name in it

-> Field name makes logical only when the type = onChange

-> I checked in my PDI and when I created onLoad client script Field name is not shown on form

So this is not OOTB behavior

See below @Sathwik1 for your reference

 

onload onchange behavior.gif

 

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