2

I had converted lookup relationship into master detail for a child object which contains lakhs of records. So when a parent record is deleted, all these child records has to be deleted automatically since now the relation has been converted into master-detail. Will this standard deletion throws some error since the records size is huge?

3 Answers 3

1

If you have already done conversion ,the child records will be auto deleted upon parent record deletion.Look for if you have any triggers on the deletion of parent record as that could impact deletion.

Below are some of the considerations that one should consider before changing relationship from lookup to master detail

  1. Make sure that every child records has a parent assigned .If you have records with no parents assigned the conversion will fail
  2. All child records will have the ownerId as that of parent and the sharing settings will be inherited of the Parents .
  3. Make sure you don't have reports referencing the field.If you have then those have to recreated as they might throw error .

In short it does not matter how many records you have ,the system automatically takes care of conversion , however be sure to review the implications listed above and first make these changes in sandbox and experiment before doing this change in PROD environment .

2
1

Along with the points mentioned in other answers, find additional notes

  1. Verify if owner field has been used in any classes as detail record of MD relationship should not have owner field.

  2. For huge number of records, there could be possibility of halting or locking the sharing settings, when you change it. So, this needs to be performed outside of business hours.

  3. There could be change in custom report types.

Also, for more information, refer Considerations for Relationships

1

You should be fine with standard deletes as long as your data doesn't qualify to be a data skew.

Even when you talk about data skew you see the issues mainly around updates because of high chance of locking issues but not on deletes.

As a best practice, don't exceed 10,000 child records for a master-detail relationship. Also read Considerations for Relationships

2
  • Data skew won't impact deletion capability .It's good practice to ensure data skew is not violated however for deletion it should not matter as the deletion happens under the hood . Nov 12, 2018 at 15:21
  • 1
    @MohithShrivastava True let me highlight that part. Nov 12, 2018 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .