getCustomFields() public static méthode

public static getCustomFields ( Infusionsoft_Generated_Base $object, $dataType = null, Infusionsoft_App $app = null )
$object Infusionsoft_Generated_Base
$app Infusionsoft_App
<?php

include '../infusionsoft.php';
include 'object_editor_all_tables.php';
include '../tests/testUtils.php';
$customFields = Infusionsoft_CustomFieldService::getCustomFields(new Infusionsoft_Contact(), Infusionsoft_CustomFieldService::$DataType_Dropdown);
var_dump($customFields);
foreach ($customFields as $customField) {
    if ($customField->Name == 'Test') {
        $customFieldValues = $customField->getCustomFieldValues();
        $customFieldValues[] = rand(1, 100) . ' Value';
        $customField->setCustomFieldValues($customFieldValues);
        //$customField->save();
    }
}
$customField = Infusionsoft_CustomFieldService::getCustomField(new Infusionsoft_Contact(), 'Test');
var_dump($customField);
<?php

include '../infusionsoft.php';
$contact = new Infusionsoft_Contact();
$customFields = Infusionsoft_CustomFieldService::getCustomFields(new Infusionsoft_Contact());
/** @var Infusionsoft_DataFormField $customField */
$customFieldsAsArray = array();
foreach ($customFields as $customField) {
    $customFieldsAsArray[] = '_' . $customField->Name;
}
$contact->addCustomFields($customFieldsAsArray);
$contacts = Infusionsoft_DataService::queryWithOrderBy(new Infusionsoft_Contact(), array('Id' => '%'), 'LastUpdated', 1, 1, array('Id'));
var_dump($contacts);