- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 07:22 AM
Hi Team ,
am using below catalogue client script to re-direct a catalogue item to Order guide , but I want to write a script include for this , so that it can be used for other order guides also . can you please guide me on how to use this script for Script include .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 09:20 AM
Hi @soumyadaggula ,
You can do this by creating client callable script include and adding this code to it. you have to use GlideAjax to call that script from you client script. I tried this and it did worked, you have to pass tstr as a parameter to script include.
.
Script include:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 07:30 AM
@soumyadaggula This is client side code, you will not be able to convert this to a Script include (Server side code). Instead, you can plan to convert this to a UI Script(client side code) and call the same UI script from different client scripts.
Please refer to this documentation https://docs.servicenow.com/bundle/washingtondc-application-development/page/script/client-scripts/c... to know more about UI Scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:25 AM
@Sandeep Rajput
thank you Sandeep , I will try this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 09:30 AM
@soumyadaggula Please mark the response helpful and accepted solution if it managed to answer your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:35 AM
Hi,
Redirection can happen on client side also. Any reason why you need to get to server side and do it?
On Client side it can be as simple as this
var redirectURL = 'https://www.google.com/'; //url to redirect; this approach works in platform and Service Portal view
top.window.location = redirectURL ;