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
ravindra reddyravindra reddy 

Hi all , i am creating visualforce in that i am using picklist in that picklist containing 10 object if select the object in back end i want to delete all the duplicate records and display the remaining records

Hi all ,
i am creating visualforce in that i am using picklist  in that picklist containing 10 object if select the one object in back end i want to delete all the duplicate records and display the remaining records 
i am using SOQL to fetch the records but it will lead to problem suppose in account object there are l lakh records
plz help  me to  reslove this  ,thanks in advance

Thanks & Regards
Ravindra
M.sfM.sf
Hi Ranvidra,

What is the criteria to check the duplicates use conditions to query them only.
If you get more than 10k records then you can't delete them in one apex context. Then you have to run a batch class for that.

Thanks
 
ravindra reddyravindra reddy
Hi M.sf
i am new salesforce can you expalin brifly when i want to delete more than 10 k records. explain with code

Thanks & Regards
Ravindra