- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 03:54 AM - edited 07-05-2024 03:55 AM
Hi,
We have a requirement to use different view (Instead of Default) for different users in Problem Form. Users should also be restricted from switching views as views. We used View Rules to implement this. However, the Modals on problem Form also enforced the view because of the view Rule.
Any Idea on how we can fix this or enforce a view without using View Rule, so that Modals won't have issues?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 03:58 AM
The page displayed in the popup has sysparm_is_dialog_form=true parameter in the URL, which you can make use of in the script of your view rule:
(function overrideView(view, is_list) {
if (gs.action.getGlideURI().getMap().get('sysparm_is_dialog_form') != 'true')
answer = 'my_custom_view_for_problems';
})(view, is_list);
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 07:49 PM
Hi @Aying,
Why do you need to apply a different view on the modal only?
Just trying to understand the business requirements here.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2024 07:48 PM
Hi James.
Sorry for not being clear.
Our requirement is to have a Custom View on Problem Form (depending on user).
However, when we use View Rules to enforce the Custom View on users, it also applies to Modals and that is our issue. Custom View should only apply on Problem Form. But because of View Rules, it also shows on Modal.