
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2021 10:04 AM
I have a UI action on the "Steps (sn_test_management_step)" table that creates a copy of the current records selected. The UI action is a list banner button and list choice. The button is utilized from the "Steps" related list on the Test Version form. When the records are selected from the list view (screen shot below), it does create a copy however it redirect to the first record selected instead of back to the form. How can I fix this?
UI action script:
var gr = new GlideRecord('sn_test_management_step');
gr.initialize();
gr.step = current.step;
gr.test_version = current.test_version;
gr.insert();
action.setRedirectURL(current);
action.setReturnURL(current);
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2021 10:22 AM
Hello Edwin Fuller,
Just try open that form where you want to redirect and copy the url of that that form and paste into the setRediretURL() method
ex action.setRedirectURL('incident_list.do');
Thank you
Saurabh,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2021 10:22 AM
Hello Edwin Fuller,
Just try open that form where you want to redirect and copy the url of that that form and paste into the setRediretURL() method
ex action.setRedirectURL('incident_list.do');
Thank you
Saurabh,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2021 10:41 AM
Thank you, don't know why I didn't think of that