Salesforce API HasOptedOutOfEmail INVALID_FIELD
Published on November 16, 2008
By Pete Freitag
By Pete Freitag
I was doing some consulting work for a client using the Salesforce.com API with ColdFusion I was getting the following error:
INVALID_FIELD: SELECT HasOptedOutOfEmail, Email, FirstName ^ ERROR at Row:1:Column:8 No such column 'HasOptedOutOfEmail' 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.
To resolve this you need to login to Salesforce.com account, and go to Setup, then Under App Setup » Customize » Contacts » Fields. Click Email Opt Out click View Field Accessibility select the type of user you are using it will probably say Hidden for all, then check Visible, and Save.
From there you should be able to query the HasOptedOutOfEmail field in salesforce api.
Salesforce API HasOptedOutOfEmail INVALID_FIELD was first published on November 16, 2008.