web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Linq to CRM VB.NET

(0) ShareShare
ReportReport
Posted on by

Hi!

I have this code which gives me

In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.

    Function GetSiiProductNumberFromProduct(productId As System.Guid) As String

        Try
            Dim ctx As DataContext = Session("Ctx")
            Dim items As List(Of Product) = ctx.ProductSet.
            Where(Function(p) p.ProductId = productId).
            Select(Function(q) New Product With {
                        .Id = q.Id,
                        .ProductNumber = q.ProductNumber
                   }).ToList()

            Return items(0).ProductNumber
        Catch ex As Exception
            Return ""

        End Try
    End Function


The same code retrieving information from custom entity works fine. Please help.

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans