- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2015 12:46 PM
I want to hide 'SAP / Application Problem' from showing up in the incident drop down for the Category field if you don't have the 'admin' or 'iGate' roles. The value for SAP / Application is 'sap_application_support'. I'm trying to use a client script on Load to remove this value. The script that is not working is below...I'm still learning how to use Javascript and have only been involved in using SNOW for about 6 months. Any help is greatly appreciated in advance...thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2015 12:51 PM
You don't have to explicitly call admins if you use hasRole. admins automatically have every role. If you use hasRoleExactly, you would. So, I would do:
if(!g_user.hasRole('iGate')){
g_form.removeOption('category', 'sap_application_support');
}
and that should suffice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2015 01:16 PM
OK next question Mike...how do I mark your answer as correct so you get credit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2015 07:10 PM
There should just be two buttons below each answer, one stating Helpful and one stating Correct.