Deleting multiple records through flow designer

anirban300
Kilo Guru

Hello All,

 

I want to delete multiple records from 'sys_user_grmember' table so I have used the below logic but it is only deleting only one record. Can someone help me to delete multiple records?

 

1. Used lookup to collect all the groups which the user is present.

anirban300_0-1695654206251.png

2. Used 'For Each' action to collect all the groups from the above lookup

anirban300_1-1695654267752.png

3. Used 'Delete' action to delete the records found in 'For Each' action

anirban300_2-1695654326169.png

 

Regards

Anirban

2 REPLIES 2

Siyabend Sakik
Tera Contributor

Hi Anirban, 

A few questions to grasp the situation a little better: 

  1. Did you put the correct the data pill into the For each loop? It should be the plural data pill "Group Member Records"
  2. Is the data pill inside the "Delete Records" Action the correct singular one "Group Member Record" 
  3. Did you put the "Delete Records" action inside of the For Each loop? The order should look like this: 
    SiyabendSakik_1-1695659230924.png
  4. Is the condition of the lookup records step even returning enough records? If you run a test on the Flow Designer you will be able to see the execution of the test run afterwards and it will list you all the records that were found.
    Make sure to test on a development/test instance though!
    I tried to make a similar flow and this is how the test run looks like for me: SiyabendSakik_0-1695659130347.png

 

Lys Davila
Tera Contributor

Did you get this working? I'm having the same issue.