You need to sign in to do that
Don't have an account?
ketan vinodrai mehta
Deleting loopup objects in bulk.
Hi,
We have multiple lookup related child objects for an Account object. We need to delete the child records based on some criteria before deleting the parent object. For less than 50K child records, it is working fine. How to delete child records in lakhs? Exmple will help a lot.
Thanks,
We have multiple lookup related child objects for an Account object. We need to delete the child records based on some criteria before deleting the parent object. For less than 50K child records, it is working fine. How to delete child records in lakhs? Exmple will help a lot.
Thanks,
Create a batch class, in start method create a dynamic query which will pass the result to execute method then upto 50 million records will be processed.
Note: Use Database.queryLocator as reuturn type.
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
I want to run the job as scheduled, say I have 700000 Accounts and have child objects as Contact (500000 records) and Job__c (600000 records), I want to delete child records as well as parent with some conditions. Can u give me an example plz.