Remove user from Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 02:59 AM
Hi community,
I have a use case where when task was set to close complete(task will set to close complete automatically, once related groups were certified), under related links there is Group section (users belongs to that groups should be removed once certified) once task was set to close complete...
task in "cert_tas'k table. can any one j=help me out with this.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 04:04 AM
Hi @Jogam Anvesh ,
1] Create After Update BR on 'cert_task' table.(The table which having task records).
2] Add condition in When to run as State Changes to close complete.
3]Use below script to delete users from group.
var group = current.group_field; //'group_field' use your field which store group on task.
var gt = new GlideRecord('sys_user_grmember');
gt.addQuery('group', 'group');
gt.query();
while (gt.next()) {
gt.deleteRecord();
}
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 06:14 AM
Hi @Sonu Parab Thanks for responding !! Iam elobrating the use case little more...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 06:16 AM