- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 05:28 AM
Hello Community
We created an event thorough flow and we are sending userid and email through URL to populate in the form once the manager click on the link ,But it not working
Mail script
var catalogItemLink = '/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_userEmail=' + current.email + '&sysparm_userName=' + current.user_name;
template.print("<a href='" + catalogItemLink + "'>" + "Click here to raise the request: Link" + "</a>");
Onload Catalog Item
var gURL = new GlideURL();
gURL.setFromCurrent();
var userName = gURL.getParam("sysparm_userName");
var userEmail = gURL.getParam("sysparm_userEmail");
g_form.setValue('userid',userName);
g_form.setValue('address',userEmail);
}
It is Not populating the userid and email in catalog item
Continue....Catalog Item Link In Send Email Action in Flow Designer
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 07:19 AM
Hi,
then you are not able to fetch the url parameters in onLoad catalog client script?
try this
function onLoad(){
var url = top.location.href;
var userName = new URLSearchParams(url).get("sysparm_userName");
var userEmail = new URLSearchParams(url).get("sysparm_userEmail");
g_form.setValue('userid',userName);
g_form.setValue('address',userEmail);
}
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
‎05-17-2022 06:12 AM
Hi,
are you sure the url came fine with the url parameters?
debug that in client script first
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
‎05-17-2022 06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 07:19 AM
Hi,
then you are not able to fetch the url parameters in onLoad catalog client script?
try this
function onLoad(){
var url = top.location.href;
var userName = new URLSearchParams(url).get("sysparm_userName");
var userEmail = new URLSearchParams(url).get("sysparm_userEmail");
g_form.setValue('userid',userName);
g_form.setValue('address',userEmail);
}
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
‎05-17-2022 08:24 AM
Hello
Now i am getting values in Variables but the issue is the manager details is getting updated in userid and email we want user details is updated
and in notification also manager details is getting in subject and content
We want below
Subject : onboarding request:username