Copying variable values of RITM to a record Producer via UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 02:43 AM
Hi All,
I have a requirement to create a button on RITM form that converts the current RITM to an Incident.
I am trying to redirect the UI action to a record producer as below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:55 AM - edited 02-27-2025 06:56 AM
your onload script seems wrong.
is that the complete script?
this link has working solution
Redirect from a UI Action to a Catalog Item and set default values
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
02-27-2025 07:14 AM
Ok but I do not have to check for any users so can i just leave if(user) and simply det values directly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 07:27 AM
var priority = current.priority;
var opened_by = current.opened_by;
var short_description = current.short_description;
var description = current.description;
var business_service = current.business_service;
gs.setRedirect('com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=1248c78d37440f40f51ea6d2b3990e67&sysparm_opened_by=' + opened_by + '&sysparm_priority=' + priority + '&sysparm_description=' + description + '&sysparm_short_description=' + short_description + '&sysparm_business_service=' + business_service);
not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 07:53 AM
in UI action you should use action object
var priority = current.priority;
var opened_by = current.opened_by;
var short_description = current.short_description;
var description = current.description;
var business_service = current.business_service;
action.setRedirectURL('com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=1248c78d37440f40f51ea6d2b3990e67&sysparm_opened_by=' + opened_by + '&sysparm_priority=' + priority + '&sysparm_description=' + description + '&sysparm_short_description=' + short_description + '&sysparm_business_service=' + business_service);
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
02-27-2025 07:44 AM
what debugging did you perform?
it went to catalog form?
what came in alert?
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