Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

ATF – Add an Existing User to a Current Group

Ajay Singh1
Mega Contributor

Hello, I am working on an ATF to add an existing user to a current group. First, I used the “Navigate to Module” to make it to the “Groups” module in the “System Security” application. Second, I applied “Open an Existing Record” to open an existing group. Third, in the Group Members related list, I tried to click on the “Edit” button via “Click a UI Action,” but there is no Edit UI Action. Does anyone know how to accomplish this? I would greatly appreciate any help.   

1 ACCEPTED SOLUTION

I change it a little as it is always best not to use an existing user. So step 1 is create user.

1. Note that I have uncheck Impersonate user since the user would not have access to add someone to a group.
find_real_file.png

2. Setup 2 is a record insert into the sys_user_grmember table. I choose to insert the user into one of the out of the box groups and set the user to step 1.
find_real_file.png

3. Next is to open an existing record using the record id from step 2.
find_real_file.png

4. Final step is field value validation to verify the groups and user are what was expected.
find_real_file.png

View solution in original post

4 REPLIES 4

brianlan25
Kilo Patron

I think the best way to simulate adding a user to a group would be to do the follwing.

1. Record lookup to get the sys_id of the group.
2. Record lookup to get the sys_id of the user.
3. Record insert to insert a record in the sys_user_grmember table passing group as the record_id from step 1 and user passing the record_id from step 2.

When adding a user to a group from the edit button in the user related list on a group the system is just adding a record into the sys_user_grmember table.

Brian, thank you for the recommendation. Would it be possible for you to share some visuals of the steps?

I change it a little as it is always best not to use an existing user. So step 1 is create user.

1. Note that I have uncheck Impersonate user since the user would not have access to add someone to a group.
find_real_file.png

2. Setup 2 is a record insert into the sys_user_grmember table. I choose to insert the user into one of the out of the box groups and set the user to step 1.
find_real_file.png

3. Next is to open an existing record using the record id from step 2.
find_real_file.png

4. Final step is field value validation to verify the groups and user are what was expected.
find_real_file.png

Brian, you are awesome. This is really helpful; thank you so much!