- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 08:45 AM
I have created a UI Action on the sc_req_item table and added the same code that I found in the UI Action for the Problem table for Creating a Standard Change:
action.setRedirectURL(new StdChangeUtils().getURLForTask(current, 'rfc'));
When this UI Action is clicked, it opens the list of all Standard Change templates. Upon selecting a template, a Change Request is created.
My Requirement:
I want the RITM (Requested Item) to be displayed in the Related Records section of the Change Request that is created from the Standard Change template.
I have implemented similar UI Actions for creating Normal Changes, where I use a different approach to link the RITM. However, that approach doesn't apply here, since this process first redirects to the Standard Change template selection page.
var change_id = changeRequest.insert();
current.parent = change_id;
current.u_change_request = change_id;
current.update();
Question:
Is there a way to implement this functionality so that the originating RITM is linked to the Change Request created via the Standard Change template?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 08:58 AM
try this
var url = new StdChangeUtils().getURLForTask(current, 'rfc');
url += '&ritm_sys_id=' + current.sys_id;
action.setRedirectURL(url);
then use onLoad client script and try to get ritm_sys_id from URL and set it in parent field on CHG
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 05:03 AM
try with normal UI action and let them select the template and see using onload client script what comes in URL
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 01:59 AM
so let them select the template and see what comes in the URL and then parse and get the value.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader