Pass values through URL-Catalog Item

Hemant1
Kilo Expert

Hello Community

@Ankur Bawiskar 

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

1 ACCEPTED SOLUTION

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Thanks for this!

Hemant1
Kilo Expert

Hello @Ankur Bawiskar 

Is this Possible through flow or some other way If Sent Notification failed trigger another Notification after 24 Hours and if user forgets to submit RITM  send reminder after 48Hours 

Any inputs 

 

 

Need to explore on that part.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader