Hey ,
Thank you so much for providing an example.
I have followed the same steps you mentioned and below is fetchXML that I am using where I have some issues:
The above fetch XML will retrieve the N items related to one work order. However, in my query I want to add more conditions as below:
1. To find only the WO's that are having records of more than 1 line item. (So mainly if a work order like the below screenshot it should not be included in the result because in my case it is the last one and the newer record by date).
that is similar to this query in SQL:
SELECT haceb_workorder, COUNT(haceb_workorder)
FROM haceb_assetdetail
GROUP BY haceb_workorder
HAVING COUNT(haceb_workorder)>1
2. Will it be possible to filter the data based on a year and my UTC as you mentioned? I think it will be between two date ranges to make it work.
Example: I want only the line items that are created in the year 2020 and the newer records should not be included in the result.
Please let me know if the above is feasible.
I would highly appreciate it if you can provide an example.
Best regards,
EBMRay