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
AMAN SINGH 24AMAN SINGH 24 

How to make account and contact relationship unique?

EldonEldon
Hi Aman what do you mean by unique relationship? Do you mean only one child contact for a parent account record? 
If that is the case in custom objects its achievable using vlookup but in your case you will have to write a trigger probably.
Pavan Kumar 862Pavan Kumar 862
Hi Aman,
I didnt understand completely.But if you want to amke one child for one parent make the one to one relationship between two Account and Contact.
How to acheive?
1.Create Roll up summary field as Contact_count__c on Account where Summary Type is COUNT.
2.Now create the validation rule on Contact with Rule :Account.Contact_count__c ==1,which will restric the user to enter duplicate contacts to accounts.So one parent can have one child.