Reply
Contributor
paragonn
Posts: 4
0

Error Updating Contact Record

[ Edited ]

The Error:
SoapFault: INVALID_FIELD: No such column '' 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 SoapClient->__call() (line 514 of C:\..\php_toolkit\soapclient\SforceBaseClient.php).

 

Troubleshooting so far:
I have checked that the object being passed to update is both in an array and populated with an Id, Fields and Type properties.

 

The Code:
$fields = array( 'FirstName' => $values['first_name'],
'MiddleName' => $values['middle_name'],
'LastName' => $values['last_name'],
'MailingStreet' => $values['mailing_street'],
'MailingCity' => $values['mailing_city'],
'MailingState' => $values['mailing_state'],
'MailingPostalCode' => $values['mailing_zip'],
'MailingCountry' => $values['mailing_country'] );

 

$force_api = get_force_api();

 

$sf_contact = new SObject();
$sf_contact->fields = $fields;
$sf_contact->type = 'Contact';
$sf_contact->Id = $account->field_id->value();

 

$result = $force_api->update(array($sf_contact));

Contributor
paragonn
Posts: 4
0

Re: Error Updating Contact Record

Ok, it appears I was able to fix this problem by assigning the fieldsToNull property an empty array like below:

$records[0]->fieldsToNull = array();