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

Thanks Anurag link worked fine now. Can we pass the display names in the URL instead of sys_id ?


kittu1
Giga Contributor

Hi Anurag,



Is their a way to pass user names instead of sysid's.



Thanks,


Vamsee.


Hi Vamsee,



I haven't tried that , it might work.


-Anurag

Anurag Tripathi
Mega Patron
Mega Patron

Hi,




the basic url followed by sysparm_query will help you to redirect to any form and also populate the fields on that form.


sys_param_query shpuld be followed by <field name on the form>=<value>


-Anurag