Questions tagged [cascadedelete]

A cascade delete is the scenario in which child records of a deleted record are also automatically removed from the system as part of the original, single action of deleting the parent.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
742 views

Do master-detail relationships not cascade their deletes?

I was under the impression that deleting a master record in a master detail relationship would delete the detail record automically, cascading the delete. In practice I get this error DELETE_FAILED, ...
TemporaryFix's user avatar
  • 2,937
0 votes
1 answer
1k views

Is the "Delete this record also" option for Lookup relationships available only after getting the 'Cascade-Delete' option enabled for your org?

When creating a new Lookup Relationship on a custom object, there should be 3 behaviours to choose from when the parent object record is deleted (according to documentation): Clear the value of this ...
Bloke's user avatar
  • 217
0 votes
1 answer
580 views

Prevent Attachment deletion on Case deletion

I have a requirement where Cases closed over x amount of days should be removed from Salesforce. However, when deleting the Case, the subsequent e-mail messages and attachments linked to both e-mail ...
user1067017's user avatar
  • 1,007
0 votes
1 answer
401 views

Delete Account Error "Cascade deleting too many records"

I would like to delete an account record. But It show to me error here: I also delete all related record with this account. When I check detail record. It don't have any Activity record. What's ...
Davis Clack's user avatar
0 votes
2 answers
272 views

Cascade Delete on Lookup in Unmanaged Package

Salesforce has the option to enable cascade deletion for lookup relationships. Thus, if you delete the parent in the lookup, the child will also be deleted. However, this option must be enabled on a ...
John Phillips's user avatar
1 vote
0 answers
367 views

SOQL Query records deleted by cascade

I have a soql query ran in a trigger on AfterDelete of parent that finds all deleted objects that are children of this parent. It looks like this: SELECT Id, FROM child_object_c where ParentID='123' ...
Elliot's user avatar
  • 205
0 votes
1 answer
3k views

DELETE_OPERATION_TOO_LARGE, Cascade deleting too many records

I have 4 custom objects which has master-detail relationship with each other. Obj A (Parent) | Obj B (Child of Obj A) | Obj C (Child of Obj B) | Obj D (Child of Obj C) So if I delete Obj A , ...
Sindhuja's user avatar
  • 145
6 votes
0 answers
258 views

How many child records can a parent cascade delete (documented limit)?

I have a CustomObject__c which has childrens 2 level deep. Together a single parent object can have many 10.000 child records. Would it work to auto-delete the thousands ob child records just using a ...
Robert Sösemann's user avatar
0 votes
1 answer
1k views

Governor limits involving cascaded deletes?

I'm writing a job to bulk delete records from my database. I've already seen this question: Cascade delete limits? But it does tell me how the deletion limits are affected. The object whose records ...
coldspeed's user avatar
  • 701
2 votes
1 answer
1k views

Operations That Don't Invoke Triggers - Cascading delete operations

I was going through documentation about Operations That Don't Invoke Triggers and got confused with Cascading delete operations. Records that did not initiate a delete don't cause trigger evaluation ...
Avinash's user avatar
  • 2,101
2 votes
1 answer
2k views

Cascade delete records

I have one object, for example Area. It has two lookup relationships to itself, Parent__c, Child__c. In result I can create record with Parent and Child parameters. I am trying build hierarchy. And ...
Leroy's user avatar
  • 67
2 votes
1 answer
1k views

Deletion trigger in a master-detail relationship

I'm trying to figure out how to structure my trigger correctly. I have a trigger that fires properly when the detail is deleted, however I cannot figure out how to write a trigger handling the ...
Tyler's user avatar
  • 569
1 vote
4 answers
3k views

How can I mass delete records from custom objects?

I would preferably like to use a point-and-click approach or an appexchange app which helps me accomplish that? Also, if there is an app for recursive delete of data, that would be fantastic.
Kevin Bellati's user avatar
3 votes
1 answer
2k views

Prevent related record deletion, except when parent record is being deleted

I have two custom objects, call them Parent and Child. Child has a Lookup to Parent, via Parent__c. It is not a Master:Detail relation. What pattern could I use to prevent deletion of a Child record ...
Pittsburgh DBA's user avatar
10 votes
2 answers
6k views

Delete Operation Too Large - but all related records have been deleted

I had more that 1,00,000 child objects records for a single record of parent Object. After deleting the child object records when I am deleting the parent record I am getting the below error:- Using ...
SalesforceLearner's user avatar
7 votes
1 answer
3k views

Cascade delete limits?

Is there a limit to the number of records that can be deleted in cascading delete? We are receiving an error "Deletion Unsuccessful You cannot delete this object" when trying to delete records ...
Justin J Carlson's user avatar