I am using the C# web-service to get data from salesforce,
After calling the "sforceService.describeSObjects()" function, I am running on the object and get they ChildRelationships.
For example, I try to get the relationship between Account<--->AccountShares
The values in the object are:
currentSObject.name ="Account" (This is the Primary table)
relationship.relationshipName ="Shares"
relationship.childSObject = "AccountShare" (This is the foreign Table)
relationship.field = "AccountId" (This is the foreign Key on AccountShare)
My Question is, from where if get the Primary Key column in the Account table?, there is no column "Shares" in Account table, so the relationship.relationshipName is not the Primary Key (I try to build a basic 1:Many relationship).
Thanks for the help!
Update: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_majors.htm
From this ERD, I understand that almost every table have "Id" column that is the PrimaryKey on that table, but that's not right for all the tables (for example Contract table dosent have Id column)