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

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

Wan't adding an alert already suggested in my previous post. Also, as stated earlier, console.log show up in browser console.

Yes, I checked in the browser and it doesn`t work for some reason