by eggsurplus

Control what your users can access and save time, money, and frustrations. Lock down sensitive data in SugarCRM or SuiteCRM to specific groups or teams. Supports unlimited assigned users, unlimited group assignments to records, custom layouts for each group, login/sudo capabilities and much more.

Free 30 day trial
Try it Now

By clicking you consent to share your profile with the developer

#1704 - Auto assign contacts to group accounts

Closed General Question created by Referro B2B Marketing Verified Purchase 9 years ago

I can't find how to assign contacts to accounts that are assigned to a group. So the account is part of a sales region. The user is member of the group (with group only rights). The user can't see the contacts under the account unless the contact is part of the security group. How to accomplish this?

  1. eggsurplus member avatar

    eggsurplus Provider Affiliate

    9 years ago

    Going forward, any newly created contact will inherit the group from the account depending on your inheritance settings in SecuritySuite Settings. However, this doesn't help if you installed SecuritySuite after you have much of your data in place already. For that scenario it will take some work. If you are comfortable with SQL then I'd recommend creating a script to do this data setup. You can also use the search on the Contacts module to filter for certain Accounts and then mass assign the appropriate groups.

    Here is a sample script (untested, backup db prior to using):

    insert into securitygroups_records(id,securitygroup_id,record_id,module,date_modified,deleted)
    select uuid(),sg.id,c.id,'Contacts',now(),0
    from securitygroups sg
    inner join securitygroups_records sr on sg.id = sr.securitygroup_id and sr.module = 'Accounts' and sr.deleted = 0
    inner join accounts a on sr.record_id = a.id and a.deleted = 0
    inner join accounts_contacts ac on a.id = ac.account_id and ac.deleted = 0
    inner join contacts c on ac.contact_id = c.id and c.deleted = 0
    where sg.deleted = 0;
    
  2. eggsurplus member avatar

    eggsurplus Provider Affiliate

    8 years ago

    Closing this out, but feel free to follow up if you have any more questions.

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
Rating
  • "Outstanding plugin. Great flexibility - took a little time to learn about the options, but great to have them available." - tcorlett

    Read More Reviews