Reply
Regular Visitor
julisana
Posts: 1
0

Simple Problem with AccountContactRole Query

Hey Guys, I'm pretty new to Salesforce development, and I'm running into a problem that I just don't understand.

 

I'm trying to do something really simple: Find out if there's a primary contact associated with an account ID that I specify in the code.

 

For example:

$results = $mySforceConnection->query("SELECT ContactId FROM AccountContactRole WHERE AccountId='001A000000Bi7jyIAB AND IsPrimary=TRUE'");

 

But no matter what I do, I can't get any data back from this table. Even if I do something like:

$results = $mySforceConnection->query("SELECT ContactId FROM AccountContactRole");

As I understand it, that should pull all contact ID's from AccountContactRole.

 

I know it's something stupd and small, but what am I missing?