Posted in Salesforce

Cascade deleting too many records

Cascade deleting too many records
DELETE_OPERATION_TOO_LARGE:Cascade deleting too many records

This is because there are too many records or related records to be deleted, which cannot be stored in Recycle Bin.
For example: I faced this issue while deleting Opportunity, altough there were only few Opportunity but there were many related Opportunity Line Item and Schedules.

1. Emptying the Recycle Bin/Org Wide Recycle Bin can be one solution, or contact Salesforce to permanently delete Org Wide recycle bin.
2. Perform Hard Delete and this requires “Bulk Api Hard Delete” permission.
3. Contact to get the Enables cascade delete.

Read the article for “Activation of Bulk API Hard Delete on System Administrator profile”

But even this did not solve the issue.


Reduce the batch size: 50

In a many-to-many relationship, a user can’t delete a parent record if there are more than 200 junction object records associated with it and if the junction object has a roll-up summary field that rolls up to the other parent.

To delete parent object record, manually delete junction object records until the count is fewer than 200.

So deleting Opportunity Line Item before deleting Opportunity was the only option.

Even this soulution didn’t work, and the error says :-
Delete Operation Too Large. You can’t delete more than 100,000 combined objects and child records at the same time.

Posted in Salesforce

Maximum Number Of Duplicate Updates In One Batch

As the error describes we can update a particular record in a single transaction for max. 12 times after which we get the error.

Maximum Number Of Duplicate Updates In One Batch (12 Allowed). Attempt To Update Id More Than Once In This Api Call

The records are updated with values till 12th update.