#2151 - When assigning a security group to an account, is there a way to automatically inherit this group to all assigned contacts, documents etc.?
I just installed the SecuritySuite 2.9.3 to my SugarCRM CE 6.5.23 in German.
Then I mass-assigned all accounts to security groups, but the contacts, documents, tasks etc. are not automatically set to the same security group as the "mother" (account).
Any way you can help me?
Thanks for your help in advance!
Kind regards, Karl Maier
8 years ago
Hi Karl,
This is going to be a one-time setup thing since you already have data in your SugarCRM instance. After that, you will no longer need to do this as they will automatically be inherited at the time of record creation. To automatically inherit groups to your already created contacts, documents, etc you will need to do some SQL to grab the groups assigned to the account and associate them to your other records. This page has an example at the bottom of how to do this for Contacts.
https://www.sugaroutfitters.com/docs/securitysuite/developer-tips
Let me know if you have any questions.
8 years ago
Hi and thanks for the quick Reply - unfortumatelly the SQL Code does not work and gives back a null result.
Here is a dump of the database: [removed]
Help ;)
Kind regards, Karl
8 years ago
Just tested the query again to be sure and it works as is for the contacts in the subpanel of an account. Can you try copy/pasting it again? Any errors that you get after running it? This query is meant for MySQL. Are you on MSSQL? If so, I can tweak it for you.
8 years ago
Just tried it 3 times a couple of minutes ago . No errors, just a null result. I run MySQL.
8 years ago
Have you added the groups to the accounts already? Are there contacts assigned to that account? Is that the standard contacts module and relationship to accounts that comes shipped with SugarCRM?
By the way, I have your dump and removed the link in the comment above. I'm hoping that I can get you going here without me using your dump as it could be some time before I can look at it. Extremely busy this week.
8 years ago
Yes to all of your questions...
8 years ago
I just ran the script against your database and it inserted 3087 records.
8 years ago
Hope you were able to figure this out! Closing the case for now, but feel free to follow up here if needed. Testing the script against your database seemed to work just fine so it may be an issue with your SQL editor.