I'm trying to find the best approach to query a Dataverse table to get a list of all records where any changes have been made to either the parent record or its children (through a 1-N relationship) in the past 24 hours. I can't seem to get this to work through FetchXml. I did consider creating another date field on the parent entity with a flow triggered by any modifications to the child table, but that feels an inelegant solution. Has anybody else got an alternative approach?
<fetch>
<entity name="parent_entity">
<attribute name="parent_name" />
<filter type="or">
<condition attribute="modifiedon" operator="last-x-hours" value="24" />
</filter>
<link-entity name="child_entity" from="parent_id" to="parent" link-type="outer" alias="child">
<attribute name="child_name" />
<filter type="or">
<condition attribute="modifiedon" operator="last-x-hours" value="24" />
</filter>
</link-entity>
</entity>
</fetch>
Thanks!