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
AstroCRMAstroCRM 

1:1 Relationships Account-Custom Object. My way to do it.

Hi all,

I just wanted to share the way I configured the application so that I can have a 1:1 relationship between Accounts and a Custom Object. Hopefully this will help someone:


On the Custom Object

1 Have a look up to Account
2 Create a custom text field (50 characters or less) (name can be anything e.g AID)
3 Make sure to tick the "Do not allow duplicates" box
4 Make the text field available to everyone but don't put it in the page layout

On Workflow Rules

1 Create a rule related to your custom object that executes everytime a record is created or updated
2 Set it to some "Common Sense" criteria e.g mine is when "Owner" not equal to "null"
3 Create a field update from that Workflow rule you just created
4 In the wizard set the field to update to that text field you created in your custom object (e.g AID)
5 In the formula enter the name of the lookup field to account (eg. account_c)

Save and activate the rule and that should do the trick. Everytime the user tries to create a record a second record related to that same account, they will get a Data Uniqueness Violation error message :)

Hope it helps.