Example: I have two custom objects having following details:
1) Employee (Name, PanCardNo)
I have gone through documents of salesforce, but i can able to find out only lookup (One-to-many raltionship) and master-detail relationship(many-to-many relationship).
Is there any way to create one-to-one relationship??
In this article we’ll be using Master-detail relationship to implement
To make a this relationship one-to-one we will be using
rollup summary concept.
- Create a rollup summary field
managerCount(count) in departments, this will be auto populated depending upon the number of managers associated with that particular department.
- Create a
入力規則) in department object on managerCount field. Throw an error “department can be managed by only one manager”when the managerCount is greater that 1.