Redirect the page to List layout after submit a record

meyananth
Kilo Contributor

Hi Team,

I have created a custom UI Page for Create New in Change Module and am able to create new Change request successfully. After submitting the Change through the custom UI Page, the page is redirects to the previous page. Its not redirect to Change List layout page.

Version: Helinsinki

Steps I have tried:

I tried producer.redirect in the UI Page screen to redirect the page - Its not working.

Also, I cant update the Submit Action button, because that has been defined globally.

Can anyone please help me to redirect the page to List layout instead of the previous screen?

Thanks,

Meyananth

1 ACCEPTED SOLUTION

anurag92
Kilo Sage

Create a New Form button (UI action) on Change request table and override the Global Button as below:



find_real_file.png



Copy all the code of Submit button and add a line in the end:



answer = current.insert();


gs.include('ActionUtils');


var au = new ActionUtils();


au.postInsert(current);



action.setRedirectURL('change_request_list.do');



Let me know if this works.


View solution in original post

4 REPLIES 4

anurag92
Kilo Sage

You can create a custom UI button in your UI page or override the current submit button to redirect.


Thanks Anurag,



So in that case, i have to build the custom UI button for three different types of changes and please elaborate in overriding the current submit button only for Change module.



Thanks


Meyananth


anurag92
Kilo Sage

Create a New Form button (UI action) on Change request table and override the Global Button as below:



find_real_file.png



Copy all the code of Submit button and add a line in the end:



answer = current.insert();


gs.include('ActionUtils');


var au = new ActionUtils();


au.postInsert(current);



action.setRedirectURL('change_request_list.do');



Let me know if this works.


Thanks Anurag,



It works for me.