Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Perl, PHP, Python & Ruby Development
- :
- Re: Error Updating Contact Record
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Error Updating Contact Record
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2012 09:32 AM - edited 11-02-2012 09:37 AM
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));
Re: Error Updating Contact Record
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2012 11:02 AM
Ok, it appears I was able to fix this problem by assigning the fieldsToNull property an empty array like below:
$records[0]->fieldsToNull = array();

