Salesforce API HasOptedOutOfEmail INVALID_FIELD

November 16, 2008

I was doing some consulting work for a client using the 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 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.

3 people found this page useful, what do you think?

Recent Entries