I have a custom entity new_originatingaccounts with a string field new_sun
Account entity has a 1 to N relationship to new_originating accounts (new_licenceid)
I'm trying to return new_originatingaccounts.new_licenceid as a string.
I know that it's probably not the done thing but I need it for two reasons;
1. I can check if it is a null value, ie the new_originating account does not exist
2 I can check a custom status field in the accounts entity
Dim LicenceID As String = String.Empty
Dim SUNList As New QueryByAttribute("new_originatingaccounts")
SUNList.ColumnSet = New ColumnSet("new_licenceid")
SUNList.Attributes.AddRange("new_sun")
SUNList.Values.AddRange(sun)
Dim ReturnedLicenceidList As EntityCollection = service.RetrieveMultiple(SUNList)
For Each ReturnedLicenceid In ReturnedLicenceidList.Entities
LicenceID = ReturnedLicenceid.Attributes("new_licenceid").Tostring
Exit For
Next
*This post is locked for comments