Not displaying complete choice list
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 08:07 PM
Hello,
I am having issue to display the complete choice list and it only happen to certain roles . I have attached screen shots of what I am having issues with. Anyone have any ideas?
Admin, its working fine as it display the complete list:
When I impersonate to someone with the role I'm testing out, i get incomplete list:
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 09:37 PM
please try code logic
1.
function onLoad() {
//who to display it for - admin
var isAdmin = g_user.hasRole('admin');
if (!isAdmin){
g_form.removeOption('contact_type', 'integration');
}
}
2.
function onLoad() {
//Type appropriate comment here, and begin script below
var userRole = g_user.hasRoleExactly('wm_security');
alert(userRole);
if(userRole == true){
g_form.removeOption('category','electrical');
}
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 03:25 AM
Hi Ram,
Thank you for your feedback. Btw I've found the root cause.