You need to sign in to do that
Don't have an account?

Duplicate in List
In my order insert trigger, i need to update contact for the order information, I know there are duplicate records in the my contact list. so I use
Contact[] contactToUpdate = new List<Contact>(new Set<Contact>(contactList));
to remove the duplicates.
but I still receive the error message: duplicate in List.
any idea??
Thanks
Hi
List datatype always contain duplicate value. Please use set datatype to remove duplicate.
Cheers
Sanj
Thanks for reply.
the correct answer:
http://stackoverflow.com/questions/10791984/salesforce-apex-trigger-duplicate-id-in-list