I have a requirement, that I should Query all the Account Contact Relationship junctions records for a contact. Could someone direct me to the Query?

I used the below Query but not able to retrieve records.

Select Id, Name,(SELECT AccountId,ContactId,Id,IsPrimary,Role FROM AccountContactRoles) from Contact where Id ='0037j00000XSyJG'

Thank you, Vara


You are querying the wrong object. It should be AccountContactRelation


SELECT id, AccountId, ContactId, contact.Name FROM accountcontactrelation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.