Populating a ticket based on a url
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2015 04:27 PM
Hello,
We would like users to be able to create incidents using a QR code.
The following page looks like it describes how to create a new ticket with values from a url: http://wiki.servicenow.com/index.php?title=Navigating_by_URL#Open_a_Form_with_Preset_Values&gsc.tab=...
However, when I try the following, it just creates a new ticket without the short description or category filled:
https://<instance>/facilities.do?sysparm_stack=facilities_list.do&sys_id=-1&sysparm_query=caller_id=...Restroom Cleaning
The end game would be to put up QR codes in the various rooms so that users could use those to file tickets when there is a problem.
Alexander Harris
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2015 04:58 PM
Hi Alexander,
I believe that on the parameters you just need something like the following:
Note: Every reference field must be associated with it's sys_id
Disclaimer: Edited post after Thijs input. Thanks Thijs Daemen
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2015 05:31 PM
Hi Berny,
From the wiki page (Navigating by URL - ServiceNow Wiki😞
You can also use JavaScript to access GlideSystem methods. The following creates the same type of incident as above, and also populates the caller ID with the current user ID:
https://<instance name>.service-now.com/nav_to.do?uri=incident.do?sys_id=-1%26sysparm_query=priority=1^incident_state=3^caller_id=javascript:gs.getUserID()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2015 05:30 PM
Hi Alexander,
In your URL, you have the following phrase 'facilities.do', does this refer to a ui page or a CMS page? I'm not sure it is an out of the box page. In which table would you like the records to appear?
Also, for this to work the user would always need to be authenticated with ServiceNow and must submit the record before it is entered into ServiceNow. The URL doesn't automatically create a record, it prefills one with information.
A way to automate it would be to redirect the user to a ui page that fetches the relevant parameters (RP.getParameter) and automatically create a record. It would be anonymous (probably), which might be a drawback. The ui page would need to be public in order to prevent authentication, or not, in which case you can retrieve the logged in user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2015 03:04 PM
Hello,
The facilities application is a copy of the out of box incident application modified for use by that group.
The short description is a text field, and the category is a choice list (not a reference field).