Security Groups: Inherit works differently for records created via Rest API

Just noticed unexpected behavior in Security Groups:

Setup:

  • SecuritySuite Settings: “inherit from parent record” activated
  • SecuritySuite Settings: “Inherit from Created By User” deactivated
  • SecuritySuite Settings: “Inherit from Assigned To User” deactivated
  • Campaign “TESTCampaign” belongs to “SecurityGroup TEST”
  • I’m logged in as Admin: My Admin user account belongs to no Security Group.

Case 1: Manual Create Lead:
I create a new lead manually and enter Campaign “TESTCampaign” in the Campaign relate field. => Save Lead

Outcome: New Lead belongs to Security Group TEST. It has inherited the Security Group from related Campaign “TESTCampaign”.

Case 2: Create Lead via Rest API
I create a new lead via REST API and enter Campaign ID for Campaign “TESTCampaign” in the Campaign field.

Outcome: New Lead is assigned to no Security Groups. (but Campaign is set correctly)

Is this a bug? Anyone have an idea why these two cases don’t give the same outcome?

Two years and no one replied to you? What a shame.

I just started using Security Groups and use REST API to create new cases and contacts and it appears the API when you login as a group user no associated securitygroup records are created. So I guess you have to do it “manually” via direct DB access after the API calls are completed for each new record? If this is corerct, I’m guessing it’s because the SecurityGroups module isn’t a “standard” SugarCRM module so it’s outside the scope of the API because whomever developed the SecurityGroups module didn’t update the API code to include it?

1 Like