2

I have an API call to get ACL roles that worked before I upgraded to 4.7.29 (I think I was at 4.7.22). Now, this returns no results:

    $entity_id = $group["id"];
    $apiParams = array("entity_id" => $entity_id
            , "entity_table" => "civicrm_group", "is_active" => 1);

    $entity_name = "Acl_Role";
    $result = civicrm_api3_get($entity_name, $apiParams);

I'm debugging now, but wondering if anyone can quickly tell me if something changed recently that I need to catch up on?

1
  • I have since learned that the api call works, but all the records in the civicrm_acl_entiry_role are gone. I'm now try to learn why that hasn't adversely affected the Manage ACL Roles form. Feb 6, 2018 at 13:50

1 Answer 1

1

I am not sure why you are using civicrm_api3_get. The standard way for v3 api calling is civicrm_api3('entityName', 'action', $params).

Just try replacing the snippet from above question to below:

 $entity_id = $group["id"];
 $apiParams = array(
   "entity_id" => $entity_id,
   "entity_table" => "civicrm_group",
   "is_active" => 1
 );

 $entity_name = "Acl_Role";
 $result = civicrm_api3($entity_name, 'get', $apiParams);

HTH

Pradeep

1
  • Sorry for the confusion. The civicrm_api3_get is the wrapper I put around civicrm_api3($entity_name, 'get', $apiParams). I have since learned that the api call works, but all the records in the Feb 6, 2018 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.