The client script is not working in service portal but working in try it option in catalog form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:18 AM
I created a on change catalog client script such that based on requested for's country and the options he chose in domain ,category and service fields(reference) will make a particular value be set and read only in service desk filed. Please take a look at the below script and help me out. I did select UI type as ALL and cannot change the whole script but can add to the existing one I added my script after the MX country. I would like the answer ASAP ,as I am running out of time:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 07:42 AM
Hi @Ponnada,
Yes, that could work. Are you running into issues with it?
Of course, you could also follow @Sandeep Rajput's option, if you feel comfortable enough to create the GlideAjax call. This would be better for performance.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 07:21 AM
Hi @Peter Bodelier ,
Yes, It is still not working.I am not sure where I am going wrong.
Best
Kasthuri

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 08:08 AM
Hi @Ponnada,
Place debugger; as first line in your function. This way you can check in your browser console where it's going wrong.
See Debugging in the browser (javascript.info) on how to use that.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:56 AM
@Ponnada Instead of making the synchronous GlideRecord calls from he client script, you can replace them with GlideAjax call by creating a script include and making the API call asynchronous.
Please refer to this URL to know more about script includes https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/new_to_servicenow/app_store_lear...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:59 AM
That is also a possibility, but overcomplicates things for many people.
Using asynchronous query does the job as well, and is easier to understand.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.