Service Portal: Is it possible to add parameter to the URL without reloading the page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 04:58 PM
Hi guys
I have an order guide that does not use Rule base and dynamically add catalog items through the "Script" field (not catalog client scripts, but the field called Script in Order Guide). I basically use guide.add to include items in the "Choose Options" page. However, the challenge is I need to get the user id which is one of the variables/questions on the Order Guide. There is no way I could access variables through the Script field (according to the community, my research, and finally HI confirmed this). However, as a workaround, I know I can append the value of my variable to the URL by adding to the on change catalog client script the following:
history.pushState
and then in the Script get this parameter using
gs.action.getGlideURI().getMap().get('leaver_user_id')
The problem is, whenever I change the URL, the page keeps refreshing. Is there a way I could prevent this from happening? I thought pushState already prevents page from reloading but this doesn't to be working on my use case.
Any help is greatly appreciated.
Thanks
Regina

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 09:40 PM
Hello,
Check below link will might help you,
If answer is helpful mark correct!
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 03:16 AM
Hi Pratiksha, thank you for the reply and I apologize for not replying sooner. I have actually seen this prior to my post and this didn't resolve my issue. The page still kept on refreshing. I have since used a different way to deliver my requirement.
Thanks,
Regina