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
KRamaKRama 

Contact Duplicates

Hi,

    

      I am trying to write a trigger for the contact field so that we can stop duplicate entries. I went thru a lot of posts and the cookbook for the example. I am unable to use it as it is does not help me completly. We have one contact that handle multiple accounts, so we create the contact with the same details for different accounts.

      The examples work on the basis that it checks on only one field (Email) to see if the contact is a duplicate or not. I would like to check on one more field (Accounts). What I would like to do is first check if the contact is already existing, if the contact is existing then check if it is for the same account, if yes then it should be duplicate if not I should be able to save it.

 

1. if contact is new, then there is not need to check for account just save it.

2. if the contact exists check if it is for the same account

 

Please help me in getting this accomplished

 

Thanks

KD