only HR group members have to submit the full employee user creation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello All,
1.I've a catalog item,where the request type is a drop down which have the values "software","Hardware","peripherals", and "User Account Management".
2.Now,only the admins or "HR members" or "RMS members" can be able to see the "User Account Management".
3.If "User Account Management" is selected,we've a drop down down containing the values "Employee User creation" and "contractor worker-user creation".
Now I want a)if logged in user is admin or Hr member, "Employee User creation" should be visible.
b)If the logged in user is admin or RMS member "contractor worker-user creation" should be visible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @vsaikiran
May you try user catalog client scrip onLoad
See the code example:
function onLoad() {
var userHasAccess = false;
// Check roles of logged-in user
if (g_user.hasRole('admin') || g_user.hasRole('hr_member') || g_user.hasRole('rms_member')) {
userHasAccess = true;
}
// If user does not have access, remove "User Account Management"
if (!userHasAccess) {
g_form.removeOption('<variable_internal_name>', 'User Account Management');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
53m ago
Hello Rafael,
Thank you for the reply. Here, can you please help me with the sys_id's rather than the roles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
51m ago
I wrote a code like the below, but hard luck for me