Catalog Client script not working

swesarjann
Tera Contributor

Hi everyone, I have created a new catalog client script. However, it does not work even though I am just logging in the console. I have checked and not other UI policy runs to counteract this. I will attach the script here.

 

ps. it works once if I trigger it multiple times

3 ACCEPTED SOLUTIONS

@swesarjann try to add an alert in the client script and run it in incognito window by changed the requested for field. Hopefully it will work as sometimes client script throw issues due to browser caching. 

View solution in original post

Vishal Birajdar
Giga Sage

Hi @swesarjann 

 

Can you please let us know where you are checking the logs...??

also can you put some alert() in your script to check it.

 

alert('My message');  //something like this

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

View solution in original post

That's great...!!

Console logs also works...You have to check that in browser console actually like below :

This is my script :

VishalBirajdar_1-1705654544883.png

 

VishalBirajdar_0-1705654502993.png

 

 

To check browser console >> Right click on page >> Select 'Inspect' 

 

VishalBirajdar_2-1705654681321.png

 

 

 

 

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

View solution in original post

12 REPLIES 12

Yes I`m triggering it

@swesarjann try to add an alert in the client script and run it in incognito window by changed the requested for field. Hopefully it will work as sometimes client script throw issues due to browser caching. 

Can you respond in detail what I am asking?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Vishal Birajdar
Giga Sage

Hi @swesarjann 

 

Can you please let us know where you are checking the logs...??

also can you put some alert() in your script to check it.

 

alert('My message');  //something like this

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

It works on alerts. I think console logs don`t work, thanks for this