Announcements
Hello,
In the agreement entity in the field service module I have a bunch of historical records for every service account that are (Active and Expired).
What I want to achieve is the below:
I want to build a custom fetchXML query that should only find the LAST expired agreement(s) for a service account with taking into consideration the below condition:
Below is an example:
Service Account = "Test1", Agreement Status = "Expired"
Service Account = "Test1", Agreement Status = "Canceled"
Service Account = "Test", Agreement Status = "Active"
Service Account = "Test", Agreement Status = "Expired"
Based on the above example, the Service Account Test1 should be visible on the view and returned as a result of the query because his last agreement is expired.
From the advanced find, I am not able to achieve this requirement with the condition needed.
Could you please provide an example or a sample to achieve the above requirements? If it is feasible, simply I can use the View designer on XRMToolBox to alter the system view that I want based on the query needed.
Any help is highly appreciated.
Best regards,
EBMRay
Hi EBMRay,
According to your example, it needs to retrieve last child record first, which cannot be done with FetchXML only.
Please refer to the following issue:
(+) FetchXML to retrieve last child record - Microsoft Dynamics CRM Forum Community Forum
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156