• Thrantor
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

I've created a Opportunity Contact field for Opportunity which is a lookup on the Contact table.

 

From salesforce I can see the contact and work with it and everything looks happy.

 

But when trying to access the contacts information using PHP I get nothing. I'm using the following code:

 

	$queryOpportunity = "Select AccountId, Amount, Paid__c, Opportunity_Contact__c from Opportunity WHERE Id = '$id'" ;
	$OppResponse = $mySforceConnection->query(($queryOpportunity));
	foreach ($OppResponse->records as $OppRecord) {
		$subtotal = $OppRecord->Amount ;
		$email = $OppRecord->Opportunity_Contact__c->Email ;
		var_dump($OppRecord) ;
		var_dump($OppRecord->Opportunity_Contact__c) ;

 

 

And I can't get any of the information for the contact. Help.

 

Also, Instead of grabbing the AccountID and doing a seperate query on account is there anyway to just grab the account information with this query as well?