- 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 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 09:58 AM
@Ashish37
Hi Ashish ,
thank you a lot for helping me with the script include , but can I remove the sys ID in the script , and get the sys id for the catalogue item which user is trying to open , and re-direct it to order guide page , with this I can use the same script include for multiple order guides .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 10:06 AM
@soumyadaggula Glad I was able to help. yes you can use your sys_id, if its not going to change for sure then you can hard code it in script include like i did OR if you like you can create a system property and call gs.getProperty() to use it.
Please accept solution or mark answer if my solution was able to resolve your problem. Thanks!