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

Announcements

No record found.

News and Announcements icon
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:
I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

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

    Hope this helps.

  • Johnny Gong Profile Picture
    6,482 Moderator on at

    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
    Dynamics365 Rocker Profile Picture
    7,755 on at

    You can use fecthxml to retrieve at client side.

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    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.

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 > Customer Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans