PHP salesforce update Error "no such column as fields"

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sri123
Forum Newbie
Posts: 1
Joined: Tue Mar 15, 2011 9:20 am

PHP salesforce update Error "no such column as fields"

Post by sri123 »

Hi
I have spent enormous amount of time on this. am working for anon profit. I am using enterprise client as partner client gives me item invalid. i have tried everything here, but it simply doesnt work. I am trying to update fields in a contact table.

$id = '003A000000XRVFxIAP';
$data1 = 'Newyork';
$updateFields = array ();
$updateFields['FirstName'] = $data1;

try{
$sObject1 = new SObject();
$sObject1->Id = $id;
$sObject1->fields = $updateFields;
$sObject1->type = 'Contact';
$result = $client->update(array($sObject1),'Contact');
if($result->success)
{
echo("<brsucexxssfo <br>");
}
else{

}
}

I am getting the same error-- no such column 'fields' on entity contact, please help

Strict Standards: Creating default object from empty value in C:\xampp\htdocs\Proj1\ForceToolkit\soapclient\Sfor ceEnterpriseClient.php on line 89
INVALID_FIELD: No such column 'fields' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
Error Info
SoapFault exception: [sf:INVALID_FIELD] INVALID_FIELD: No such column 'fields' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. in C:\xampp\htdocs\Proj1\ForceToolkit\soapclient\Sfor ceBaseClient.php:508 Stack trace: #0 C:\xampp\htdocs\Proj1\ForceToolkit\soapclient\Sfor ceBaseClient.php(508): SoapClient->__call('update', Array) #1 C:\xampp\htdocs\Proj1\ForceToolkit\soapclient\Sfor ceBaseClient.php(508): SoapClient->update(Object(stdClass)) #2 C:\xampp\htdocs\Proj1\ForceToolkit\soapclient\Sfor ceEnterpriseClient.php(90): SforceBaseClient->_update(Object(stdClass)) #3 C:\xampp\htdocs\Proj1\createAccount.php(93): SforceEnterpriseClient->update(Array, 'Contact') #4 {main
Post Reply