X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FContact%2FCustomFieldGet.php;h=5806b7cb4c29ad3e011ecbdfa2a76fcc0128308f;hb=edb0d67a5384286d3bcafb4c36f21a0c5b355dda;hp=d9ba8f04d9788d132a6827bda2ae4c87b0e1c2d1;hpb=fe265b4e47246d8dfdfd05e8f8b7cceeb48a8d13;p=civicrm-core.git diff --git a/api/v3/examples/Contact/CustomFieldGet.php b/api/v3/examples/Contact/CustomFieldGet.php index d9ba8f04d9..5806b7cb4c 100644 --- a/api/v3/examples/Contact/CustomFieldGet.php +++ b/api/v3/examples/Contact/CustomFieldGet.php @@ -4,12 +4,12 @@ /*this demonstrates setting a custom field through the API */ function contact_get_example(){ -$params = array( +$params = array( 'first_name' => 'abc1', 'contact_type' => 'Individual', 'last_name' => 'xyz1', 'version' => 3, - 'custom_2' => 'custom string', + 'custom_3' => 'custom string', ); $result = civicrm_api( 'contact','get',$params ); @@ -22,16 +22,16 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', - 'civicrm_value_testgetwithcu_2_id' => '1', - 'custom_2' => 'custom string', + 'civicrm_value_testgetwithcu_3_id' => '1', + 'custom_3' => 'custom string', 'id' => '1', ), ),