UI Action - Insert and Stay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 12:21 PM
Hello All,
I have created a UI Action to copy the change request and View Rule (name: ITO).
Everything is working fine except it does not stay on the new record.
Here is the script:
var gr = new GlideRecord("change_request","&sysparm_view=ITO&sysparm_view_forced=true");
gr.initialize();
gr.category = current.category;
gr.u_category_type = current.u_category_type;
gr.u_category_item = current.u_category_item ;
gr.cmdb_ci = current.cmdb_ci ;
gr.priority = current.priority ;
gr.risk = current.risk ;
gr.impact = current.impact ;
gr.urgency = current.urgency ;
gr.short_description = current.short_description ;
gr.description = current.description ;
gr.u_ito = current.u_ito ;
gr.assignment_group = current.assignment_group ;
gr.assigned_to = current.assigned_to ;
gr.u_need_justification = current.u_need_justification ;
gr.change_plan = current.change_plan ;
gr.backout_plan = current.backout_plan ;
gr.test_plan = current.test_plan ;
gr.u_test_results = current.u_test_results ;
gr.u_notification_plan = current.u_notification_plan ;
gr.u_verification_plan = current.u_verification_plan ;
gr.state = current.state ;
gr.insert();
action.setRedirectURL(current);
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 08:19 AM
Hi Allen,
No, it is not working. That was my first tried.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 02:54 PM
Try this
action.setRedirectURL(gr.getGlideRecord());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 03:40 PM
No, it goes to the instance home screen.