Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I am using Microsoft CRM 2011 SDK and I'm trying to replace some SQL selects with relative SDK QueryExpression.
The question is: in C# language how can I convert this follow query?
from dbo.salesorder as a
where name like '%TEST%'
OR (select b.accountnumber from dbo.account as b where b.accountid = a.customerid) like '%TEST'
I'll await an answer. Thank you very much!!!
Are you looking for the code to convert SQL to QueryExpression or the QueryExpression itself?
If first - I'm afraid that's not doable.
If you are looking for Query alone I would recommend to use FetchQuery instead and use following FetchXml Query
<entity name="salesorder" >
<filter type="or" >
<condition attribute="name" operator="like" value="Test" />
<condition entityname="a" attribute="accountnumber" operator="like" value="Test" />
<link-entity name="account" from="accountid" to="customerid" link-type="outer" alias="a" />
Hi Matteo Veggiari,
There is no any direct way to convert SQL to query expression. Please refer below url to create query expression using like operator.
Business Applications communities