function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to update Email_Opt_Out field

How can I update "Email_Opt_out" field of "Contact" object?
I need to create or update a contact object using web service.
The field name I am looking for should be "HasOptedOutOfEmail". But I cannot find this field in the web service object and wsdl file.

You can definitely get to it using the partner wsdl - and it is the HasOptedOutOfEmail field.
But I cannot find it in the partner.wsdl either. It looks like that the partner.wsdl is just a subset of enterprise.wsdl. In partner.wsdl I cannot even find the definitions of all the objects, such as "Contact", "Account" and so on.

What am I missing here?


objects are described at runtime only in the partner API, see that section in the docs.
I found the field listed in our Enterprise.wsdl file in the Contact complexType section:

I just searched the WSDL file to locate it.