You need to sign in to do that
Don't have an account?
Queryresults missing Id?
I'm just starting to work with the API in PHP and I have run into something odd.
Given this simple query, my results contain everything except the Id of the returned record.
Am I missing something, the Id field is there, but it contains a '0', not the Id of the returned record as expected.
$query = 'Select UnitPrice, Quantity, PricebookEntryId, OpportunityId, Id From OpportunityLineItem WHERE OpportunityId = \'' . $opportunityId . '\' AND PricebookEntryId = \'' . $salesTaxPricebookEntryId .'\'';
$response = $mySforceConnection->query($query);
$queryResult = new QueryResult($response);
QueryResult Object
(
[queryLocator] =>
[done] => 1
[records] => Array
(
[0] => SObject Object
(
[type] =>
[fields] => stdClass Object
(
[OpportunityId] => 006S0000002pi1YIAQ
[PricebookEntryId] => 01uS0000000xeDiIAI
[Quantity] => 1.0
[UnitPrice] => 47.5
)
[Id] => 0
)
)
[size] => 1
)
I figured it out. It turns out that I was specifying the PartnerUrl for my endpoint but using the Enterprise Wsdl .