In this scenario, is there a way using the QueryExpression to access a
field from the account entity in the result set?
Dim service As New CrmService()
service.Credentials = System.Net.CredentialCache.DefaultCredentials
service.Url =
"http://localhost:5555/mscrmservices/2006/crmservice.asmx"
Dim cols As New ColumnSet()
cols.Attributes = New String() {"fullname", "jobtitle"}
Dim link As New LinkEntity()
link.LinkFromEntityName = EntityName.contact.ToString()
link.LinkFromAttributeName = "accountid"
link.LinkToEntityName = EntityName.account.ToString()
link.LinkToAttributeName = "accountid"
Dim query As New QueryExpression()
query.EntityName = EntityName.contact.ToString()
query.ColumnSet = cols
query.LinkEntities = New LinkEntity() {link}
Dim retrieve As New RetrieveMultipleRequest()
retrieve.Query = query
Dim retrieved As RetrieveMultipleResponse =
CType(service.Execute(retrieve), RetrieveMultipleResponse)
Michael
----------------------------------------------------------
Thanks. I had gotten to the point where I thought it was not possible
but thought I'd raise the question to get confirmation.
James