3

I am trying to use the CaseType API to create a case_type but I can not find any documentation on how to set the definition parameter. Any hints or should I just dive into the code?

2 Answers 2

1

It's probably actually easiest to look at the code. CRM_Case_BAO_CaseType::convertDefinitionToXML() gives the list of array elements to set, e.g.

$definition = array(
  'activityTypes' => array(
    'key1' => 'value1',
    'key2' => 'value2',
  ),

  'statuses' => array(
    'blah1',
    'blah2',
  ),
// etc...
);
0
1

You can use the Api Explorer to fetch an existing case type with definition and inspect it.

enter image description here

1
  • Thanks Coleman, pretty ad I did not think of that myself :-( Commented Nov 30, 2017 at 15:07

Your Answer

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

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