Question
Is it possible to modify ContactId
field on an Opportunity? I get a field security error, but I did not find an option to change the security level of the field.
Motivation
I have records with missing ContactId
that I want to fill in.
Example Python Code
from simple_salesforce import SalesForce
sf = Salesforce(username=SALESFORCE_EMAIL, password=SALESFORCE_PASSWORD, security_token=SALESFORCE_TOKEN)
opportunity_id = '0067Q00000Bw2rgQAB'
new_contact_id = '0037Q00000LOEvxQAH'
sf.Opportunity.update(opportunity_id, data={'ContactId': new_contact_id})
Error
'Unable to create/update fields: ContactId. Please check the security settings of this field and verify that it is read/write for your profile or permission set.'