Function Below shows Following When Participating for an event Using custom data : 1) Get the custom data contact . 2) If not Get then Create new contact . 3) Create New Participant for Event . 4) Check for Organization & create if organization not exist . 5) Check for Relationship & create if previous not available . function eventType_customPath_civicrm_post( $op, $objectName, $objectId, &$objectRef ) { if ( $objectName == 'Participant' && $op == 'create' ) { require_once 'api/api.php'; $config =& CRM_Core_Config::singleton( ); $participantParams = $config->_customParams; $participantFirstNameId = array( 'custom_22', 'custom_60', 'custom_62' ); /* add custom first name Id */ $participantLastNameId = array( 'custom_59', 'custom_61', 'custom_63' ); /* add custom ...
Controlling complexity is the essence of computer programming