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 experience | Sales, Customer Insights,...
Unanswered

Convert query to Dynamics 365 CRM

(0) ShareShare
ReportReport
Posted on by
can any one share me how to convert  below xml query to query Expression CRM 365
..
select top 10 d.nkf_date,  --d.nkf_nehrnotes,
c.nkf_nricfinno, c.contactid, c.fullname,
dc.nkf_institutionrefno,
(select top 1 m.nkf_esrfdate   
from filterednkf_medicalassessment m
where m.nkf_contactid = d.nkf_patientid and m.nkf_contacttype= '100000001' and m.nkf_esrfdate is not null) as esrddate
from filterednkf_dialysistreatementassessment d
left join filteredcontact c on c.contactid = d.nkf_patientid
left join filterednkf_dialysiscenter dc on dc.nkf_dialysiscenterid  = c.nkf_dcid
where convert(varchar(10), d.modifiedonutc, 126) = '2024-02-21' --and d.nkf_nehrnotes is not null
order by d.modifiedon desc
 
I have the same question (0)
  • AdamTravers Profile Picture
    25 on at
    That is a SQL and not XML. If you want to convert SQL to XML (Dynamics query) there is a tool to do this within the XrmToolbox called SQL 4 CDS
     
    (1) Within Xrm Toolbox open the SQL 4 CDS tool
    (2) Copy and paste your SQL in the query window

     
    (3) On the Toolbar click Convert -> Fetch XML

     
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 197 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans