we use Talend to upsert a bunch of Accounts and Contacts(from the old archive) each night. Now im trying to also upsert the Account-Contact Relation.

Sadly my Talent Job always gives me this error: "INVALID_FIELD_FOR_INSERT_UPDATE:Unable to create/update fields: AccountId. Please check the security settings of this field and verify that it is read/write for your profile or permission set.:AccountId --".

Im running the Upsert with Admin permissions and on the Ui the fields can be updated. But in Workbench i cant see the two fields when trying to update. As far as i understand the two fields: "AccountId" and "ContactId" are not updatable. Is there a way to change that? I looked in sharing settings, on the Object itself,Permission sets and Profiles. Account and Contact are both read/write. Any help would be greatly apprichiated as i am a bit at a loss.



1 Answer 1


Nope, there is nothing you can do to change that behavior.

Looking at the object reference for ACR, you'll see that both AccountId and ContactId are missing the Update property.

If you need to make a new connection between a Contact and Account, you'll need to create a new ACR record for it.
If you need to remove an existing connection between a Contact and Account, you'll need to delete the ACR record for it.

The deletion part is probably the harder of the two. Because of how triggers work, you're not going to be able to know which records to delete unless you

  • pre-compute that outside of Salesforce first
  • compute it somewhere (including inside of Salesforce) after all of the upserts have finished

Without going too deep into this, I imagine one way to handle the deletions would be to have a scheduled batch class (Apex) that gathers records that haven't been modified in the past 24 hours and then delete them.

  • Well thanks for your answer. Guess i gotta improvise.
    – Alex
    Mar 20, 2023 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .