- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 07:54 AM
I tried creating a UI action to add the user to the group but the button won't do anything on click.
I created the UI action on the sys_user table and added the below script but nothing is happening. Nothing in the logs either. Any suggestions?
var rec = new GlideRecord('sys_user_grmember');
rec.initialize();
rec.user = current.user.sys_id;
rec.group = '9da403d8979fdd103749312e2153af7e'; //group ABC
rec.insert();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 08:26 AM
Hi @GB14
can you please uncheck client checkbox and try that will work.
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Regards,
Ranjit Nimbalkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 08:06 AM
var rec = new GlideRecord('sys_user_grmember');
rec.initialize();
rec.user = current.sys_id;
rec.group = '9da403d8979fdd103749312e2153af7e'; //group ABC
rec.insert();
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Regards,
Ranjit Nimbalkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 08:13 AM
Thanks Ranjit
I tried it but had no success. This is my UI action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 08:26 AM
Hi @GB14
can you please uncheck client checkbox and try that will work.
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Regards,
Ranjit Nimbalkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 08:49 AM
this worked. thank you so much