- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2022 10:26 AM
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";
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2022 12:01 PM
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
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2022 10:46 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 01:24 AM
Hi, I am a Dev so I have the full access to all views and etc. and it works if I change views manually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2022 12:01 PM
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
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 01:24 AM
hello,
This did not work