Reputation: 11
i am looking to give a one to one relation between objects in sales force.For example each product has one structure one service one card product one account service which are also custom objects.Please help me with the same.
Upvotes: 1
Views: 2281
Reputation: 11
Create a text field with unique flag checked and a workflow to populate this field with ID of the parent object. So if second object is linked, workflow will give error.
Suppose you have object A with a lookup to object B. Then create a text field on object A with unique flag checked and workflow will populate ID of object B.
Upvotes: 1
Reputation: 6278
There is no one-to-one relationship in salesforce. You "emulate" it by having a lookup from object A into B and from object B into A and you use custom coding to enforce it (usually with triggers on all participating objects that will detect new/updated link and reciprocally update lookups in the other direction).
On page layouts, you hide the related lists and leave only lookup fields.
Upvotes: 3