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
SFNewSFNew 

Raise Flag if Duplicate contacts found

Hello All,

             I am trying to write a client that would update our orgs data to force.com. I have a dilemma here. We are using the standard objects "Account" and "Contact". I understand CONTACT is an independent object that could be assigned to any ACCOUNT, also an ACCOUNT could have multiple contacts right?. We have a custom object CC__c that is a child of ACCOUNT. Now we have a custom look up field in CC__c that points to a particular CONTACT associated with that CC__c. So from SF page for CC__c, we can look up a CONTACT associated with the ACCOUNT. If I am confusing too much, the relationship is like this

 

ACCOUNT -->1..* CC_c 

 

ACCOUNT -->1..* CONTACT

 

CC__c -->(lookup field) 1..1 CONTACT

 

I was playing with contacts and realized that, if there is a CONTACT for ACCOUNT ABC Corp and its being associated with the object CC__c, I can assign the same CONTACT for another ACCOUNT BBC Corp and associate with CC__c object of BBC Corp. I tried to place a validation rule in the lookup custom field in the CC__c page. I am not sure if this is what I should be doing,if so could anyone help me with a validation snippet for the same, or is there any other way to handle this. Any help in this regard is greatly appreciated. Thanks much.

Message Edited by SFNew on 04-02-2009 08:50 AM