Using the Salesforce SOAP API to query some data from accountContactRole table. What is the best way to get a relationship value from the query result. When I perform the query in workbench or developer query editor it returns the correct data but I need to know how from my SOAP API VB.NET code would I get the Contact.Contact_Number__c value from the queryResult object?
soql = String.Format("SELECT AccountId, ContactId, Contact.Contact_Number__c FROM AccountContactRole where accountid = '{0}' and role = '{1}' limit 1", salesforceAccountId, roleName)
qr = binding.query(soql)
If qr.records.Length = 1 Then
Return qr.records(0) <<<<<<<----------- How to pull out contact.contact_number__c
End If
qr.records(0).Contact.Contact_Number__c
, isn't it?