Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How many types of client scripts in service now ?

PruthwirajS
Kilo Contributor

Hi Service now family,

 

Can anyone tell me how many types of client scripts in service now ?

 

Thanks;

Pruthwiraj 

1 REPLY 1

Sarthak Kashyap
Mega Sage

Hi @PruthwirajS ,

 

We have 4 types of client script in Servicenow 

 

  • onLoad(): When the form loads, before user input.
  • onSubmit(): When the form is submitted; can validate or cancel submission.
  • onChange(): When a specific field’s value changes on a form.
  • onCellEdit(): When a cell value is edited in a list.

 

https://www.servicenow.com/docs/r/api-reference/scripts/client-scripts.html

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak