+ Start a Discussion
Jason AdamsJason Adams 

Is the "Any" field in a queryied sObject part of the Partners setup?

I've recently started working with Salesforce, so this is all still pretty new to me. I just got OAuth working with the PHP Toolkit, and I'm not able to perform queries. Great! The trouble is I'm a little perplexed by what I'm getting.

In any Records object, I'm getting three fields: Id, any, and type. Id and type make sense, but any seems to be xml for every non-id column I've queried.. I am using the Partners.wsdl, and I understand it's loosely typed. Is this a consequence of using that? It's just unfortunate that I'll have to parse every value for every object. That can result in a  lot of overhead.

Thanks for any and all advice!
Best Answer chosen by Jason Adams
NBlasgenNBlasgen
Shashank is correct, but just as it's a best practice to not only have the answer be on an external site, I'd like to share the solution in the body for others to find.

$response = $mySforceConnection->query($query);

foreach ($response as $record) {
    $sObject = new SObject($record);
    print_r($sObject);
}
As found on: http://stackoverflow.com/questions/15698362/trouble-with-salesforce-query-results-php-toolkit

All Answers

ShashForceShashForce
Hi Jason,

This should help: http://stackoverflow.com/questions/15698362/trouble-with-salesforce-query-results-php-toolkit

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
NBlasgenNBlasgen
Shashank is correct, but just as it's a best practice to not only have the answer be on an external site, I'd like to share the solution in the body for others to find.

$response = $mySforceConnection->query($query);

foreach ($response as $record) {
    $sObject = new SObject($record);
    print_r($sObject);
}
As found on: http://stackoverflow.com/questions/15698362/trouble-with-salesforce-query-results-php-toolkit
This was selected as the best answer