Announcements
How to get the old value and new value from audit entity using fetch xml query.
We are using the power automate for generate the pdf report for audit entity but we are not able to get the old value from audit using xrm.
Hi Naveen,
Thanks for your reply. We are using this query to get the list from audit in Ms flow. I want the old value and new value with this query .
<fetch>
<entity name="audit" >
<attribute name="regardingobjectid" />
<attribute name="auditid" />
<attribute name="action" />
<attribute name="objectidname" />
<attribute name="createdon" />
<attribute name="objectid" />
<attribute name="attributemask" />
<attribute name="objecttypecode" />
<attribute name="userid" />
<attribute name="useradditionalinfo" />
<attribute name="useridname" />
<filter>
<condition attribute="objecttypecode" operator="eq" value="3" />
<condition attribute="createdon" operator="yesterday" />
</filter>
<link-entity name="opportunity" from="opportunityid" to="objectid" >
<attribute name="ig1_projectnumber" />
<attribute name="new_estprojectcompletion" />
<attribute name="ig1_bestsalesestimate" />
<attribute name="estimatedclosedate" />
<attribute name="ig1_salesstagenew" />
<attribute name="statecode" />
<filter>
<condition attribute="statecode" operator="eq" value="0" />
</filter>
</link-entity>
</entity>
</fetch>
Hello Rahul,
Please check below links:
https://www.bythedevs.com/post/get-record-change-history-of-audited-entities-in-power-automate
André Arnaud de Cal...
293,289
Super User 2025 Season 1
Martin Dráb
232,068
Most Valuable Professional
nmaenpaa
101,156
Moderator