UI Action: redirect back to form

Edwin Fuller
Tera Guru

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);

find_real_file.pngfind_real_file.pngfind_real_file.png

1 ACCEPTED SOLUTION

Saurabh Gaikwad
Mega Expert

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,

View solution in original post

2 REPLIES 2

Saurabh Gaikwad
Mega Expert

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,

Thank you, don't know why I didn't think of that