Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.4
-
Fix Version/s: 4.5
-
Component/s: CiviCRM API
-
Labels:
Description
Perform this query:
civicrm_api('Contact', 'get', Array('version'=>'3', 'return' => 'custom_2', 'id'=>1));
Receive this result:
Array
(
[is_error] => 0
[version] => 3
[count] => 1
[id] => 1
[values] => Array
(
[1] => Array
(
[contact_id] => 1
[id] => 1
)
)
)
Notice that the custom_2 field is not returned.
However, this call:
civicrm_api('Contact', 'get', Array('version'=>'3', 'return' => 'custom_2', 'custom_2' => 'Committed', 'id'=>1));
Returns this:
Array
(
[is_error] => 0
[version] => 3
[count] => 1
[id] => 1
[values] => Array
(
[1] => Array
(
[contact_id] => 1
[civicrm_value_custom_contact_fields_1_id] => 2548
[custom_2] => Committed
[id] => 1
)
)
)
Notice that the custom field is properly returned.