Set the Custom view to default view when an IT team user open User form.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Community,
I have created a custom form view specifically for IT team users. My goal is that whenever they open the User module form—whether for an existing user or when creating a new user—this custom view should be set as the default view for them, and they should not be able to change it.
What I’ve tried so far:
View Rule (by assigning a custom role to the IT team):
(function overrideView(view, is_list) { var isLimitedUser = gs.hasRole("limited_user_creator"); if (isLimitedUser) { answer = "User View For IT"; } else { answer = view; } })(view, is_list);
OnLoad Client Script:
(function onLoad() { // Check if the user has the IT role if (g_user.hasRole('limited_user_creator')) { g_form.setView('user_view_for_it'); } })();
Result:
Both approaches are not working as expected.
I would greatly appreciate it if anyone who has solved a similar issue could share their solution or guidance.
Thanks,
Rajesh
0 REPLIES 0