function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
awinawin 

relationship queries

Following query
Select o.Description, o.Id, o.ListPrice, o.OpportunityId, o.PricebookEntryId, o.Quantity, PricebookEntry.product2.productCode
from OpportunityLineItem o
WHERE id = '00k40000004bfoe'

works fine in sforce explorer.

My question is how can I access "PricebookEntry.product2.productCode" using C#.

I believe the sample found in http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm
is java, not C#.

Thanks.
-ann
SuperfellSuperfell
// asume oli is a row from the queryResults
Console.WriteLine(oli.PricebookEntry.Product2.productCode);