
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2020 10:00 PM
I have a custom task form whose view is governed by view rules. If I want to force a specific view only in the service portal, can I do it only using view rules?
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2020 10:12 PM
Hey Tim,
You can refer to below mentioned blogs. In case if you need further assistance please let me know with your business requirement.
If my answer helps then mark my answer Correct and Helpful.
Thanks and Regards:
Utpal Dutta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2020 10:12 PM
Hey Tim,
You can refer to below mentioned blogs. In case if you need further assistance please let me know with your business requirement.
If my answer helps then mark my answer Correct and Helpful.
Thanks and Regards:
Utpal Dutta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 12:58 PM
Thank you. This is what I used from the links you provided:
(function overrideView(view, is_list) {
//get URL details
var url = gs.action.getGlideURI().getMap();
//Determine if in portal view
var isPortal = url.get('portal_id');
//If user doesn't have itil or is on the portal use self-serve
if(!gs.hasRole('itil') || isPortal);
answer = 'self_serve'; // set the new view to answer
})(view, is_list);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2020 09:30 PM
Happy to help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2020 10:32 PM
Hi Tim,
Are you saying in view rule when it is portal always all users should have particular view and view rule should not execute; in the script section you can determine whether it is portal or native
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader