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
Mansi_KatMansi_Kat 

Contacts without Accounts Sharing Rule

 We are having issue in our org. We have associated Contacts with a custom object called "Organizations". And, we want to keep contacts associated with accounts completely separate than contacts associated with Organizations. BUT because Contacts are NOT visible unless tied to an Account, we cannot simply have a Supplier - Contact association These are owned by 2 group of users. Group A and Group B. And, group A shouldn't be able to access contacts owned by Group B. The only option I could think off was, creating a generic account as ABC and associate with the Contacts related to Organizations (Contacts which are not tied to Accounts). But, that doesn't really solve the purpose. I can do this for all the existing contacts but how are we gonna tackle all new contacts created by my users. Every time a new contact record is created by Group B (which are not tied to accounts), I will have to figure out a way to relate them to the dummy account. Is there a better way to do this? And, would anyone have any suggestion on assigning ABC account for any new contact created by a user? I know a trigger can probably do this. But, since I am not a developer, I was trying to explore options through point and click instead. 

Bergen MooreBergen Moore

You could have a dummy Account for each group "Group A Contacts" and "Group B Contacts" and

 

A) Write a Validation rule that does not allow blank Account Names for Contacts, and provides the User with some text like "If this Contact is not tied to an Account, please enter 'Group A Contacts' or 'Group B Contacts' in the Account Name field. Love, Sysadmin"

GOTO: Setup > AppSetup > Customize > Contacts > Fields > Account Name > Validation Rules "New"


or (oops, I just read that you didn't want to write a trigger, anyway..)

 

B) Write a trigger that fires when an account is created.  It can check the User's Group (assuming there's a way to determine the User's group) and set the Account to "Group A Contacts" or "Group B Contacts"

 

GOTO: Setup > AppSetup > Customize > Contacts > Triggers > "New"