Redirect to incident form in workspace view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2024 01:22 AM
I am trying to redirect to incident form from a button called "create incident" and set some fields value through url link only . so this is the link I am using to redirect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2024 05:29 AM
Hi @simransagar767
First check what view is used when record is created from workspace and try to apply same view on existing record then just grab url and you will see parameter stating view copy it and append in your URL.
I tried it by doing this:
ServiceNOWInstanceName/incident.do?sys_id=-1&sysparm_query=active=true&sysparm_stack=incident_list.do?sysparm_query=active=true&sysparm_view=sow_new_record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2024 03:37 PM - edited ‎06-30-2024 03:45 PM
Hi @simransagar767
You can follow the below url pattern
For opening in classic UI - <instance-url>/incident.do?sys_id=-1&sysparm_query=short_description=test^caller_id=62826bf03710200044e0bfc8bcbe5df1&sysparm_view=sow
For opening in SOW - <instance-url>/now/sow/record/incident/-1/params/query/short_description=test^caller_id=62826bf03710200044e0bfc8bcbe5df1
Please mark it helpful if it answers your query.
Thanks,
Aditya Kushwaha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2024 02:31 AM
To do the same in a workspace button Workspace Client Script, you could write:
var targetRecordClassName = 'incident';
var encodedQuery = 'short_description=New record test^caller_id=62826bf03710200044e0bfc8bcbe5df1';
g_aw.openRecord(targetRecordClassName, '-1', { 'query': encodedQuery, });