Populate Change Request Number in Incident After Submitting Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2024 03:03 AM
Hello everyone,
I have a scenario where I need some help with my ServiceNow implementation.
I have created a UI action on the Incident table that redirects to a Change record producer. This redirection populates related fields from the Incident into the Change record producer, but it does not submit it automatically. Once the necessary changes are made in the record producer, upon submission, I need to achieve the following:
1. Change the state of the original Incident to "On Hold".
2. Set the "On Hold Reason" to "Awaiting Change".
3. Add the Change Request number generated from the record producer into the "Change Request" field of the original Incident.
I have successfully managed to handle the redirection and population of fields. However, I am struggling with adding the Change Request number back to the Incident once the Change record is created.
Could anyone guide me on how to achieve this last step? Any detailed steps, scripts, or best practices would be greatly appreciated!
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2024 09:55 AM
Please follow the fellow steps to link change number back to incident.
1. From incident UI action, add incident sys_id in the URL. For ex, <actual url>& sysparm_record_incident=<sys_id>
2. From change table, create business rule after insert. To check URL for parameter " sysparm_record_incident" and link to incident
RP.getParameterValue("sysparm_record_incident")