Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

QueryExpression and Linq query on client side ?

(1) ShareShare
ReportReport
Posted on by 235

Can I write Linq and QueryExpression on client side ? please can you share a link about it is possible. is Fetch only way for client side ?

Categories:
  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,615 on at
    RE: QueryExpression and Linq query on client side ?

    LINQ & QueryExpression are of C# native which is server side scripting language.

    You have to use client side scripting language like js/jQuery to call CRM sdk with the help of Orgservice, web api or OData Service. For simple queries you can use Rest Builder to compose direct queries, fetchxml for further extended queries.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: QueryExpression and Linq query on client side ?

    You can use fecthxml to retrieve at client side.

  • Johnny Gong Profile Picture
    Johnny Gong 6,482 on at
    RE: QueryExpression and Linq query on client side ?

    Hi Partner,

    In general, expressions in LINQ to Entities are evaluated on the server, so the behavior of the expression should not be expected to follow CLR semantics.

    docs.microsoft.com/.../linq-to-entities

    In addition, Query Expression is used in server side code for query CRM data, it is not used in client side. If you want you can write your queryexpression and can use SoapLogger application to convert that code into SOAP request (which is client side)

    Dynamics 365 SOAP Logger:carldesouza.com/dynamics-365-soap-logger

    Query Expression: docs.microsoft.com/.../gg328300(v=crm.8)

    Hope it would help.

    Have a nice day.

    Johnny

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: QueryExpression and Linq query on client side ?

    Yes, you cannot write Linq/ query expression client side. You could use simple retrievemultiple or fetchxml.

    Hope this helps.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans