- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 04:19 AM
How to get current URL link in an variable?
Requirement is from incident form through UI action url redirected to record producer which has to create change record.
Once change record created, Incident form has to be get updated with caused_by related reference field to change record.
Can you please help to get the URL link in an varaible that redirects to record producer.
Thank you
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 06:46 AM
Hi,
you need to write onLoad catalog client script to get the url parameter value
Is the extra parameter in url with name as sys_id ?
if yes then try this
function onLoad(){
var url = top.location.href;
var value = new URLSearchParams(url).get("sys_id"); // give here the parameter name
g_form.setValue('hidden_variable', value);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2021 10:04 AM
Hello
How can we fetch the same on mobile?
I have created a record producer and I'm redirecting to that record producer from mobile. I am passing sys_task_id parameter from mobile smart button and redirecting to record producer.
How to fetch "sys_task_id" parameter ??
Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 09:10 AM
This one worked for me! Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 11:12 AM
This is brilliant. Works like a charm!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 09:24 AM
Thank you !! It works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 09:31 AM
You are welcome
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader