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
Rishiraj Singh 17Rishiraj Singh 17 

System.DmlException: Delete failed. First exception on row 0 with id 0017F000009scvrQAA; first error: DELETE_OPERATION_TOO_LARGE, Cascade deleting too many records: occurring when cascading to FeedClumpMapping records: []

Not able to hard delete the 648 Account records, using simple code:

List<Account> ac= [Select id, name, phone from Account where Name like '%Infosys%'];
delete ac;

Getting error:
System.DmlException: Delete failed. First exception on row 0 with id 0017F000009scvrQAA; first error: DELETE_OPERATION_TOO_LARGE, Cascade deleting too many records: occurring when cascading to FeedClumpMapping records: []
 
v varaprasadv varaprasad
Hi Rishiraj,

The error is throwing because account related contacts and opportunities having huge data(child data in master-detail relationship if we delete parent-records child also deleted).
To avoid error Please follow steps : 
1.Use limit clause in the account query like limit 100.
2.First delete recycle bin data in the org.

More info : 
https://help.salesforce.com/articleView?id=000149021&type=1


Hope it helps you.

Thanks
Varaprasad