function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
surya prasad G Asurya prasad G A 

Data records whose IDs are stored in could not be deleted.

Hi, I am unable to delete records using flow. I am getting the error below

Data records whose IDs are stored in{!campaignmemberstobedelete} could not be deleted.

I am storing ids in collection variable. Please suggest any solution.
Thanks in Advance.
VinayVinay (Salesforce Developers) 
Hi Surya,

If you store the IDs of the records to delete in a record variable or record collection variable, choose to use the IDs from a record variable or record collection variable. Then select the variable to use. When you use a record collection variable to delete multiple records at once, you reduce the number of DML requests in your flow. That means you’re more likely to stay within your org’s limits.

Review below link for more information.

https://help.salesforce.com/articleView?id=flow_ref_elements_data_delete.htm&type=5

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar