Cannot force view on INCIDENT form using UI Action

Community Alums
Not applicable

Hello,

Cant find any solutions to simply forcing a view when New button is clicked in Incident list.

Im using the redirect code below, which works, only the view is showing "Null". If I remove sysparm_view_forced it will show me the user default view e.g. "sysparm_view=ess"

var redirect = "incident.do?sys_id=-1&sysparm_query=active=true&sysparm_stack=incident_list.do?sysparm_query=active=true&sysparm_view=ofsted&sysparm_view_forced=true";
1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Hi,

Please try the below code and see if that works for you or not:

var url = 'my_table.do?sys_id=' + my_new_record_id + '?sysparm_view=MYVIEW';
action.setRedirectURL(url);

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Can you try

var redirect = "incident.do?sys_id=-1&sysparm_query=active=true&sysparm_stack=incident_list.do?sysparm_query=active%3Dtrue&sysparm_view=ofsted&sysparm_view_forced=true

Community Alums
Not applicable

hello, it did not work unfortunately

Community Alums
Not applicable

Hi all,

Looks like a currently existing View Rule was interfering with this. I have disabled it and all of your solutions are working.