I have the following configuration in SecuritySuite:
Inherit from Created By User = false
Inherit from Assigned To User = false
Inherit from Parent Record = true
When I create a new Contact through the CRM interface and link an Account in the account_name field, the record created correctly inherits the Security Groups of the Account. This works as expected.
However, when I do this same operation programmatically (via Logic Hook, via Scheduler task, via controller.php file, etc) then the Contact created does not inherit the Security Groups of the Account.
The code I use to create the record is:
$contactsBean = BeanFactory::newBean('Contacts'); $contactsBean-> last_name = 'John'; $contactsBean-> account_id = '8bf97d3b-aeac-4522-682e-5f76ffc69b88'; // Account id with Security groups $ contactsBean-> save();
Is this the expected behavior in SecuritySuite or is it a bug?
The same thing happens in any other base or custom module.
The SuiteCRM version that we use is 7.11.15