- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 01:59 AM
var grUser = new GlideRecord('sys_user');
grUser.addQuery('sys_id', user_id);
grUser.query();
if (grUser.next() && !grUser.department.nil() && !grUser.department.business_unit.nil()) {
answer = grUser.department.business_unit.name.toString().toLowerCase() == 'test';
} else {
answer = false;
}
What is wrong with the script I want to show my scoped form to only users with business unit name as a test only but it is not working.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 02:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 02:22 AM
After using the cache.do it's working fine