How to delete multiple records through Flow Designer?

Ankita Kolhe
Tera Contributor

Hi Community,

 

I have a variable named as 'Removed Members' (type-list collector) so when request gets submitted, it should remove users from that group.( it means to delete sys_user_grmember record where group is 'x' & user is 'y').

Example:-

Group: Group A

Removed Users- User A, User B

 

Can anyone please help how to delete multiple sys_user_grmember records with the help of flow designer?

 

Thanks

6 REPLIES 6

Thanks much @Tai Vu . I'm almost there. But here I'm trying to delete sys_user_grmember record which is in global scope from custom scope. So that's the reason deletion is not working.

I'm trying to create Application Restricted Caller Access Privilege record but not sure how to configure.

 

AnkitaKolhe_0-1701079076521.png

 

Hi @Ankita Kolhe 

You must check the Can Delete checkbox in the Group Members [sys_user_grmember] to be able to process delete operation in other scope.

TaiVu_0-1701083594143.png

 

An alternative is that you can create a Script Include in the Global, then define a function deleteMembers in that script include.

And call the function inside the Flow Action, it should do the trick.

 

Cheers,

Tai Vu