The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Can we have two Client scripts on the same record

SaiDeepakk
Tera Contributor

I have a doubt which goes like this:

1. I have a client script onchange to run a script like when the channel is changed the category have only one set of options.
2. And at the same time I am running another onChange client script like when the category is changed the subcategory should contain only a set of options.

 

Is there any way to achieve this both in the default view form as well as the worksapce view form of Incident record. And If possible provide some example scripts.

Note: the client script should act at the same time when the user interacts on the incident record.

Thanks in advance,
Saideepakk.

2 REPLIES 2

Anand2799
Giga Guru

Hi @SaiDeepakk ,

 

Can you provide some screenshots of your script and form. Why do you need client script for subcategory?

You can use dependent field, so based on the category subcategory choices will show.

Anand2799_0-1758867601834.png

 

Thanks

Anand

Ankur Bawiskar
Tera Patron
Tera Patron

@SaiDeepakk 

no worries, both scripts are running on different field and will do their respective job properly provided your script logic is correct.

you should mark Global Checkbox as True so that it runs in Desktop and Workspace view

Note: Ensure Channel, Category, Subcategory fields are there in workspace view so that your logic runs fine

AnkurBawiskar_0-1758867985959.png

 

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