You need to sign in to do that
Don't have an account?
Cthulhu4242
PHP 1.1 query with relationships is hurting my brain
Using the 1.1 PHP Toolkit (thanks, guys!), I have a lovely query which now gives me all the info I want at once. The trouble is how to access it. Here is my query and code to access it:
Code:
but here's where I get hazy... How do I display the info in the info in the related object?
$r->Id works great for the Id of the Contact_Entitlement_Link__c
$r->fields->Entitlement__c works great for the Id of the Entitlement__c
How do I get Entitlement__r.Name?
Thanks in advance.
Code:
$query = "SELECT Entitlement__r.Name, Id, Contact__c, Entitlement__c FROM Contact_Entitlement_Link__c where Contact__r.email = '$email'"; $queryOptions = new QueryOptions(200); $response = $mySforceConnection->query(($query), $queryOptions); $entitlement = $response->records; if ($entitlement) { foreach ($entitlement as $r) { $r = new SObject($r); .....
but here's where I get hazy... How do I display the info in the info in the related object?
$r->Id works great for the Id of the Contact_Entitlement_Link__c
$r->fields->Entitlement__c works great for the Id of the Entitlement__c
How do I get Entitlement__r.Name?
Thanks in advance.
Message Edited by Kingsley on 04-05-2007 04:38 PM
Thanks!
Code:
$r->sobjects[0]->fields->Name;