- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 07:07 AM
Hi,
I'm able to show a User view based on the User role.
How can I add further condition of showing the view based on user role and current field value for that record user opened. (Lets say if status = 'NEW' / 'IN PROGRESS', I want to show a different view for the same user)
Also, What Is the best practice to use views / UI policies? if I meant to display different views at different stages in my workflow to same / different users.
Thanks,
Krishna
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 09:57 PM
Hi,
Please try this out, let me know if it worked.
function onLoad() {
var view =getView().toString(); // Get the current view
if(view == 'itil' || view == 'ess'){
return false; // Dont switch for itil or ess
}else if (// Add your conditions){
switchView('section','incident','my_view');
}
}
Thanks
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2019 03:02 AM
Hi Alikutty,
The solution worked fine, but it is working only for admin users. For non admin users, it is not working. Do you know why?