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

ProcessMatters
Giga Guru

Have you checked to make sure the user you are trying to redirect has access to that view, and that the view you are trying to force is correctly identified?

If it is defaulting to ESS, I suspect it is either related to roles and access, or the fact that it is their own incident. Try using the UI to redirect from another person's incident.

Community Alums
Not applicable

Hi, I am a Dev so I have the full access to all views and etc. and it works if I change views manually.

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

Community Alums
Not applicable

hello,

This did not work