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
unikevinunikevin 

Duplicated records

hi
 
How can I find the duplicated records just like duplicated email recrods in Contact Object ?
 
thanks!
 
RickyGRickyG
You can do this with Apex Code or via the API. 

Hope this helps.

- Rick Greenwald
Developer Evangelist
unikevinunikevin
How to?
Is there any SOQL sample?
I don't wanna query all the records and loop them in my app, because there are millions records..

thanks!
RickyGRickyG
If you have many records, it makes sense to use Apex Code to remove the duplicates, since this code runs on the server and avoids the need to send all the records to the client.

You shouldn't have to write that much code, as efficient use of looping logic should make the task fairly straightforward, although potentially time-consuming with that many records.

You will probably want to think about writing some code to avoid future duplication, so this de-dupe process can be a one-time event.

Hope this helps.

- Rick Greenwald
Developer Evangelist
unikevinunikevin
okey,thanks a lot!
Apex Code on our production enviroment is not available yet,I'll try it when it launches.