3 * Test Generated example of using note create API
6 function note_create_example(){
8 'entity_table' => 'civicrm_contact',
10 'note' => 'Hello!!! m testing Note',
12 'modified_date' => '2011-01-31',
13 'subject' => 'Test Note',
17 $result = civicrm_api3('note', 'create', $params);
19 catch (CiviCRM_API3_Exception
$e) {
21 $errorMessage = $e->getMessage();
22 $errorCode = $e->getErrorCode();
23 $errorData = $e->getExtraParams();
24 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
31 * Function returns array of result expected from previous function
33 function note_create_expectedresult(){
35 $expectedResult = array(
43 'entity_table' => 'civicrm_contact',
45 'note' => 'Hello!!! m testing Note',
47 'modified_date' => '2012-11-14 16:02:35',
48 'subject' => 'Test Note',
54 return $expectedResult;
59 * This example has been generated from the API test suite. The test that created it is called
61 * testCreate and can be found in
62 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/NoteTest.php
64 * You can see the outcome of the API tests at
65 * http://tests.dev.civicrm.org/trunk/results-api_v3
67 * To Learn about the API read
68 * http://book.civicrm.org/developer/current/techniques/api/
70 * and review the wiki at
71 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
73 * Read more about testing here
74 * http://wiki.civicrm.org/confluence/display/CRM/Testing
76 * API Standards documentation:
77 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards