Redirect form to list view

Murali19
Kilo Contributor

Hi,

I want to redirect the form to list view when state is active. For that i wrote onLoad client script.

Script:

if(g_form.getValue('state') == '2'){

var URL = 'u_master_file_list.do'

top.window.location = URL

}

top.widow.location opening list view but it doesn't showing navigation panel. So is it possible to redirect the existing form page to list view with left navigation panel.

 

Thanks

 

6 REPLIES 6

Jon Barnes
Kilo Sage

You could use window.location = url;

eg, don’t use “top” because that targets the parent frame.

Ashish Pinjarka
Tera Expert

Hi Murali,

 

You can use below syntax, redirect to list view.

 

action.setRedirectURL('u_master_file_list.do');

 

Kindly mark as Answered or Helpful, if applicable.

 

Regards,

Ashish P.

 

Bonnie Cresswe2
Kilo Guru

Hi

I would be asking why your customer wants this behaviour?  Sounds like it would be confusing to the user - to try to get into a form only to be redirected to a list.  What is the value statement, and maybe that will reveal another solution to achieve the end result?

Regards

Bonnie

Chris Sanford1
Kilo Guru

Maybe try 'nav_to.do?uri=u_master_file_list.do'.