php - salesforce not expected object returned calling query -
i using sforce-php toolkit objects salesforce. have following code:
$mysforceconnection = new sforcepartnerclient(); $mysoapclient = $mysforceconnection->createconnection(soap_client_basedir.'/partner.wsdl.xml'); $mylogin = $mysforceconnection->login(username, password.security_token); $query = "select firstname contact"; $response = $mysforceconnection->query($query); $queryresult = new queryresult($response); foreach ($queryresult->records $record) { print_r($record); echo "<br/>"; }
and expect objects returned in form:
stdclass object ( [type] = contact [id] = array ( [0] => 003i0000009gzvzaao [1] => 003i0000009gzvzaao ) [firstname] = "some string" [any] = <sf:firstname>some string</sf:firstname> )
so can firstname of object $record->firstname
but is:
stdclass object ( [type] = contact [id] = array ( [0] => 003i0000009gzvzaao [1] => 003i0000009gzvzaao ) [any] = <sf:firstname>some string</sf:firstname> )
so cannot firstname. attribute have access 'any'. how can object expected one? should focus?
make sure account has permission access firstname custom-field via webservice call.
Comments
Post a Comment