I was contemplating an integration where a user might click on a URL link and it would bring up a Service-now.com form that was prefilled with information taken from their web environment and generated from the custom link that they clicked.
In order to do this the Service-now form would need to accept parameters from the HTTP Request itself in the form of a GET.
Here is how you do it:
1 | https://<Insance URL>/<form name>.do?sys_id=-1&sysparm_query=<fieldname>=<defaultvalue>^<fieldname>=<defaultvalue>^etc...etc...etc |
A sample URL that would fill a sample short description of “Problem loading a web page” and setting an impact of 3 could be generated with the following URL:
1 | https://demo.service-now.com/incident.do?sys_id=-1&sysparm_query=short_description=Problem%20loading%20a%20web%20page^impact=3 |
Can this be done with Catalog Items? We can get the item to pull up, but when we try to pass it a parameter, it does not fill the value in. Awesome tip by the way – we have about 50 different ways we can leverage this.
Jason
@Jason – Unfortunately, I don’t think you can pre-fill a service catalog entry page in this manner. I don’t know if you can. You can only use this method on standard table forms.
John,
Thanks for this information really useful!
I have a question: is there any way to save incident using URL? I mean to create and save incident in Opened state using URL in one go.
Thanks in advance.
@Aleksandr – No, not with a GET fuction as I have shown, but rather, you would have to do this using a REST or SOAP based POST.
Sorry, where can I read about REST?
@Aleksandr – the best way to do this is to leverage the JSONv2 Web Service, available in the Dublin release: http://wiki.servicenow.com/index.php?title=JSONv2_Web_Service