0

I am using the API to create a custom group that extends "Participant". I want to set it to be based on Participant (Event Type).

I set the "extends_entity_column_value" and "extends_entity_column_id". However, it does not seem to pass the "extends_entity_column_id" parameter on the call.

Here is the call I am making:

$result = civicrm_api3('CustomGroup', 'create', array(
  'debug' => 1,
  'sequential' => 1,
  'title' => "Membership Bible Training",
  'extends' => "Participant",
  'collapse_adv_display' => 1,
  'extends_entity_column_id' => 3,
  'extends_entity_column_value' => 19,
));

Here is the result of the call:

{

"is_error": 0,
"undefined_fields": [
    "style",
    "is_active",
    "title",
    "collapse_adv_display",
    "extends_entity_column_id",
    "extends_entity_column_value",
    "extends"
],
"version": 3,
"count": 1,
"id": 79,
"values": [
    {
        "id": "79",
        "name": "Membership_Bible_Training",
        "title": "Membership Bible Training",
        "extends": "Participant",
        "extends_entity_column_id": "",
        "extends_entity_column_value": [
            "19"
        ],
        "style": "Inline",
        "collapse_display": "",
        "help_pre": "",
        "help_post": "",
        "weight": "1",
        "is_active": "1",
        "table_name": "civicrm_value_membership_bible_training_79",
        "is_multiple": "",
        "min_multiple": "",
        "max_multiple": "",
        "collapse_adv_display": "1",
        "created_id": "",
        "created_date": "",
        "is_reserved": ""
    }
]

}

Notice how "extends_entity_column_id" is empty. Why is this?

1

I figured it out.

You have to set

'extends' => "ParticipantEventType",

By doing that it will set the proper value for 'extends_entity_column_id'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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