[SalesForce] sObject type ‘AccountContactRelation’ is not supported

We have a project were we have recently enabled the feature allowing one Contact to link to multiple Accounts. We followed the directions according to the release notes and in the Developer console I am successfully able to execute queries such as:

SELECT Id, AccountId, ContactId FROM AccountContactRelation

However, when I try and execute this query remotely, I simply receive the error message:

sObject type 'AccountContactRelation' is not supported.

All queries FROM Contact or Account are successful. Does anyone know what I have to do to be able to query against AccountContactRelation?

I am not sure if it is relevant, but if I check the "Use Tooling API" checkbox in the developer console, I receive this same error for queries against AccountContactRelation, Contacts, and Accounts.

Best Answer

To make use of AccountContactRelation in query, we first need to enable this feature from Setup menu.

From Setup, enter Account Settings in the Quick Find box, then select Account Settings.

Select Allow users to relate a contact to multiple accounts.

enter image description here

Check the reference document here

Related Topic