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] =&gt; 003i0000009gzvzaao         [1] =&gt; 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] =&gt; 003i0000009gzvzaao         [1] =&gt; 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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -