Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Workflow lookup

$
0
0

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


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>