You need to sign in to do that
Don't have an account?
chuckdubdub
AccountID in Contact table is blank via API
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'];
$record = $queryResult['records'];
// getting the record pointer
$sfrecordid = $record->id;
$sfrecordid = $record->id;
// all of these will output except for accountid
$values = $record->values;
$firstname = $values['FirstName'];
$lastname = $values['LastName'];
$accountid = $values['AccountID'];
$firstname = $values['FirstName'];
$lastname = $values['LastName'];
$accountid = $values['AccountID'];
Thanks for any suggestions!
Chuck
smozgur
Try;
$accountid = $values['AccountId'];
It should be case sensitive.
Suat
Amq Web
Cool! Salesforce should raise an error "Field not found" if casing is not right as it does for unknow field. Silently returnng a blank value is just wrong.