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
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!
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