- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 10:28 AM
Hi all,
On salesforce side, we have one button which if clicked, users are redirected to order guide in SNOW to submit.
The URL while this OG is rendered, it contains few parameters as well which we paste on OG variables.
I've a requirement that if this order guide is opened from salesforce (hence it will have those parameters in URL), then hide choices of lookup select box variable that is under a variable set added on this OG.
This order guide is in custom app, and hence I wanted help on how I can check for those keywords in URL and remove choices from variable?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 10:56 AM - edited 07-14-2025 10:56 AM
@BijoyDeb You can use below code to get the parameters from URL. You need to use onLoad client script.
var url = top.location.href; // this will get the browser URL
var urlObj = new URLSearchParams(url);
var variable_name= urlObj.get('sys_id') // put your parameter name here in place of sys_id
Once you get the parameter value then based on it you can write you logic of hiding select box variable.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 10:56 AM - edited 07-14-2025 10:56 AM
@BijoyDeb You can use below code to get the parameters from URL. You need to use onLoad client script.
var url = top.location.href; // this will get the browser URL
var urlObj = new URLSearchParams(url);
var variable_name= urlObj.get('sys_id') // put your parameter name here in place of sys_id
Once you get the parameter value then based on it you can write you logic of hiding select box variable.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 11:18 AM
Hi @BijoyDeb,
----------------------------------------------------------------------------------------------------------------------------------------
I implemented the same requirement as this in the widget client script
var currentURL = top.location.href;
if (currentURL.includes("/now/"))
Like this you can achieve your business requirement
I hope it helps and do let me know if you still have any query.
-------------------------------------------------------------------------------------------------------------------------------------------
Please Mark my Response Helpful and Accept as solution.
Thanks & Regards
Mayank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2025 11:26 PM
Hi @BijoyDeb,
I think your query is resolved
You can accept multiple solution if my response is also correct
---------------------------------------------------------------------------------------------------------------------------------------------
Please Mark my Response Helpful and Accept as solution.
Thanks & Regards
Mayank