Passing arguments in URL

kittu1
Giga Contributor

Hello,

 

The below URL that goes straight to the new Incident form:
https://demo.service-now.com/incident.do?sys_id=-1&sysparm_query=active=true&sysparm_stack=incident_...

Required is an enhancement to allow us to pass 2 additional variables in the URL.
1. RequestedFor (CorpID)   --> this should populate the 'Requested For' field
2. Submitter (CorpID) --> this should populate the 'Submitter' field

3. And also parameter to set the Template if provided in the URL.

Using the CorpID's passed for 'RequestedFor' and 'Submitter' we then need to automatically fill in those fields in the new incidents form with the corresponding person
The 'Reported By' field should be populated with the name of whoever clicks the link.

 

Is this possible?

 

Thanks,
Vamsee.

8 REPLIES 8

AnishSasidharan
Mega Expert

Yes, its possible.   Pass the parameter+value through URL and get the value through onLoad script.



Make sure that for Reference field, since it will accept the values to be populated.



Thanks


marcguy
ServiceNow Employee
ServiceNow Employee

sysparm_query=active=true^requested_by=43545lkjsds984 (this value would be the sys_id of the user clicking the link)



as for template use &sysparm_template =



Navigating by URL - ServiceNow Wiki


kittu1
Giga Contributor

Hi,



Is their a way to pass first name and last name of the user.



Also I did try creating INC with the below URL, it did no work. Did I miss anything?



https://.service-now.com/incident.do?sys_id=-1&sysparm_query=active=true&sysparm_stack=incident_list...



Thanks,


Vamsee.


Hi Vamsee



Try this url



https://invesco.service-now.com/incident.do?sys_id=-1&sysparm_query=active=true^u_requester=449c861e...



i did not get what "sysparm_query=active=true&sysparm_stack=incident_list.do?" this is doing in the url you pasted here.


-Anurag