- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 01:08 PM
Hi everyone!
I would like to ask your assistance, I have this requirement when a new user is added to the sys_users table I need them automatically added to the PM submitter group. I created a business rule but it is not automatically adding new users. Any suggestions on what the best practice to achieve this would be.
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 10:09 PM
Hello @Gemma4 ,
What I observed in the First screenshot, You added Group as PM Submitter, but you forgot to add the User field with the value from Trigger->User Record
Please check the Second Screenshot from my Answer
I hope this clears your question
Please mark my answer helpful and correct, If it helps you
Thank you
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 01:22 PM
@Gemma4 - You can easily create a flow that runs when a new user is create and then create an action that inserts this new user into PM submitter group
I hope this helps.
Ahmed
Please mark my answer as Correct / Helpful based on the Impact
Community Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 02:21 PM
Hi @Ahmed Drar
I tried a flow but unfortunately when I create a user it is not adding the user to the group. Attached is the trigger and flow used. Any suggestions as I'm new to using flow designer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 05:06 PM
In the flow designer, you need to use Create Record action to create a record in the sys_user_grmemeber table.
And also pass both group as well as the user you want to add to the group, which should add the user membership.
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
09-21-2023 10:01 PM - edited 09-22-2023 12:37 AM
Hi @Gemma4 ,
You can create a business rule on "User" table with below configs:
When to run: after
Operation : Insert
(Apply appropriate conditions only when it suppose to consider specific users(type of users) else no need to add condition)
Advanced Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord('sys_user_grmember');
gr.initialize();
gr,group = '<sys ID of PM submitter Group>';
gr.user = current.sys_id;
gr.insert();
})(current, previous);
Please mark my answer helpful & accepted if it resolves your query.
Thanks,
Danish