- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 06:16 AM
Hi,
Is there any way to open a new incident window and populating fields using the url (passing parms and values for parms using the url) and not using client script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 01:12 AM - edited ‎02-01-2024 03:23 AM
Hi @Alon Grod,
Did you see my earlier response?
It is possible to do this via the workspace as requested. The syntax is very similar. Here's an example using the Service Ops Workspace:
To add to this, simply add the URL encoding value of '%5E' (which is the ^ symbol also known as &) followed by the field name (eg short_description) followed by the URL encoding value of %3D (which is the = symbol) followed by the value to wish to pass.
Eg: e%5Eshort_description%3DTesting
As before, if you're trying to populate a field type of reference for example, you'll need to pass the sys_id as shown with the 'assigned_to' field.
@Alon Grod To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 06:23 AM
You will always need a client script to get the URL and 'translate' it to the fields on your form. Why the requirement to
not use a client script?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 06:49 AM
Hi @Alon Grod
You can use action.setRedirectURL() in UI Action to redirect to a particular URL , you can pass the prefilled values in the URL . You can also see this article that uses a unique method of redirecting to a page with prefilled values :https://snprotips.com/blog/2021/1/20/processors-srapis-and-how-to-run-a-script-and-redirect-a-user-f...
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 06:50 AM
Hi @Alon Grod
Are you attempting to open the new window from ServiceNow itself and populate based on the existing form fields, or If I understand your question correctly, you're attempting 'deep-link' and create an incident from another app or page/form outside of ServiceNow?
Essentially, use and adapt the below syntax:
(Using Encoded URL)
(More user friendly readable format for understanding only. Please use URL encoding as above)
yourinstanceurl/incident.do?sys_id=-1&sysparm_query=short_description=Testing^impact=2^caller_id=5137153cc611227c000bbd1bd8cd2005
Please note, if you're trying to prepopulate any fields that are of type Reference for example, you'll need to pass a sys_id as highlighted in the above with the 'caller_id' field.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2024 12:01 AM
@Robbie hi, your answer works for native ui. what if I want to do the same but for the Service Operation workspace. How can I create a new incident with prifilled fields in SOW?