• Amq Web
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
If I run this query via sforce Explorer:
 
Select Id, AccountID, LastName from Contact where email = 'username@domain.com'
 
I get data output for all fields, as expected.
 
However, if I run the same query via the API (see below), I get output for all fields except for the AccountID.  The value for this field is blank.

 
   $queryResult = $sfdc->query("select AccountID, id, FirstName, LastName from Contact where email = '$emaillogin'");
$record = $queryResult['records'];
 // getting the record pointer 
 $sfrecordid = $record->id;
// all of these will output except for accountid
$values = $record->values;
$firstname = $values['FirstName'];
$lastname = $values['LastName'];
 $accountid = $values['AccountID'];

  
Thanks for any suggestions!
 
Chuck