Creating a 1:N or N:1 relationship between two entities is very straightforward, but what if you want to do a 1:1 relationship?
For example, say you have a subprocess that needs to be owned by a different user than the account owner, or you have a child relationship where only one record should be associated with the parent?
- Create a 1:N relationship and a N:1 relationship between the two entities.
- On the relationship definition, set the related records grid not to display in the navigation area
- Create a workflow that upon create of the secondary record updates the lookup field on the primary entity record.
For example: I have a custom project entity and I am adding a related technical audit entity for technical review of projects. Sure I could just add additional fields to the project entity, but this process is owned by a different user than the owner of the project, and adding all the fields will push me over the 75 field limit for CRM for tablets.
I create the technical audit entity and create a 1:N and N:1 relationship between projects and technical audit. I then add both lookup fields to their respective entities.
In this example, I want a technical audit record created every time a project reaches the approved stage. So I create a workflow that upon update of the stage to approved, creates the project technical audit linked to the project, then updates the project technical audit lookup field with a link to the technical audit
The result is a two-way relationship with a lookup field on both sides. Benefits include:
1. I can look at a project and see that a tech audit has been created for the project.
2. Give that it is a 1:1, nobody can create multiple related tech audits by mistake
3. This gives me the flexibility to show technical audit fields on project forms and views and project fields and technical audit forms and views via quick view forms.