Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Perl, PHP, Python & Ruby Development
- :
- Simple Problem with AccountContactRole Query
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Simple Problem with AccountCon tactRole Query
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-25-2012 02:30 PM
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?

