Hum, interesting, but for me it doesn’t work at all, hehe.
This is the SDK function for that:
public static function query($object, $queryData, $limit = 1000, $page = 0, $returnFields = false, Infusionsoft_App $app = null)
{
$app = parent::getObjectOrDefaultAppIfNull($app, $object);
if(!$returnFields){
$returnFields = $object->getFields();
}
$params = array(
$object->getTable(),
(int) $limit,
(int) $page,
$queryData,
$returnFields
);
$records = $app->send('DataService.query', $params, true);
return self::_returnResults(get_class($object), $app->getHostName(), $records, $returnFields);
}
You will notice that if there’s no $returnFields it will send all the fields to be returned.
Then I tried:
$results = Infusionsoft_DataService::query( new Infusionsoft_Contact(), array(‘Id’ => “[39136,38977]” ), 1000,0, array(‘Id’,‘FirstName’,‘LastName’) );
No luck. =(
But well, if it works for you, I will keep trying here. Thanks John.