- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 07:54 AM
We have a "Copy Change Request" UI Action that copies over specific fields to a new request. However, we made some groups inactive and added some code to the script to check if the assignment group is active or not and if not throw a message to the user. When an admin uses the UI action, it works perfectly. However, if a normal ITIL user hits the button, it will copy over the previous group even if it is inactive. There are no ACL's on the ui action either. Below is a code snippet that works for admins but not itil users. Ideas why? Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:59 AM
There is a business rule on group table, which restricts it. You need to update this table to allow for itil users as well.
Make sure it doesnt affect you task table. assignment_group field in task table should have filter active=true
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:42 AM
After giving read access to ITIL, login as an ITIL user and open sys_user_group.list and see, if the user is able to see the records.
Also in you script, line number8 , add gs.addInfoMessage('active flag is: '+chg.active);
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:59 AM
There is a business rule on group table, which restricts it. You need to update this table to allow for itil users as well.
Make sure it doesnt affect you task table. assignment_group field in task table should have filter active=true
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 09:09 AM
That did it! Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 08:52 AM
Can you share the whole code of UI Action? I don't see any what happens afterwards you set current.assignment_group to empty value, do you call current.update() or create the new change request from the current object without saving current? That would help us to investigate.
Also you can enhance your code to this - using dot-walking instead of that GlideRecord (code snippet not tested):
if (!current.assignment_group.nil() && current.assignment_group.active == false) {
current.assignment_group = '';
// gs.addInfoMessage etc.
}
Best regards,
Dominik