One to One Relationship in Salesforce

One to One relationship in Salesforce is not available out of the Box. But we can definitely achieve this by creating a new field and a workflow rules to update the field value with record ids of the other side of the one to one relationship.

Suppose we need to create a One to One relationship between Accounts and Contacts. For that use the below steps –

i) Create a custom field

Create a custom field on the Contact object. Make the field unique. This field would be used to hold the ID of the associated Account.

ii) Create a Workflow rule

Create a Workflow rule on Contact. Update the custom field with the value of the associated Account record ID.

Gopal Das
Follow me

Gopal Das

Founder at GopalDas.Org
He is a technology evangelist, Salesforce trainer, blogger, and working as a Salesforce Technical Lead. After working in Java based project implementation, he jumped to the Salesforce system on a whim and never looked back. He fell in love with Salesforce’s flexibility, scalability, and power. He expanded his knowledge of the platform and became a Certified App Builder, Administrator, Platform Developer I, SalesCloud Consultant while leading the Salesforce implementation and technology needs. He has worked in a wide variety of applications/services like desktop, web and mobile applications.
Gopal Das
Follow me

Leave a Reply

Your email address will not be published. Required fields are marked *