cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sammybridge
Advocate III
Advocate III

Dataverse Audit Entity

I am trying to pull the auditing into my Canvas app to show users the information of what changed and when. I have managed to get the table pulled in fine but I cannot manage to get some of the information to show.

 

When I try to identify the Changed Field, it gives me the integer ID for the field. Is there any way for me to display the following:

 

Changed Filed Display Name

Old Value

New Value

 

I know this information is sitting in the audit logs as I can see them from the audit summary, but I cannot seem to get them pulled through to my app. Here is a screenshot of what I have:

 

sammybridge_0-1615810184794.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Dual Super User
Dual Super User

Hi @sammybridge ,

 

Unfortunately you can't retrieve the change data directly from the audit record (the field is internally used and not readable) . To get the change history you need to use the Web API to invoke the RetrieveAuditDetails function, passing in the Audit ID you want to look at for the specific entry. 

 

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/retrieveauditdetails?view=d...

 

You could use a Power Automate button flow, using an HTTP action inside the flow to retrieve the audit information and return the result back to your Power App. The example below is slightly different than what you are trying to achieve, but demonstrates how to do the setup to make the HTTP call to Dataverse.

https://www.bythedevs.com/post/get-record-change-history-of-audited-entities-in-power-automate

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

5 REPLIES 5
ChrisPiasecki
Dual Super User
Dual Super User

Hi @sammybridge ,

 

Unfortunately you can't retrieve the change data directly from the audit record (the field is internally used and not readable) . To get the change history you need to use the Web API to invoke the RetrieveAuditDetails function, passing in the Audit ID you want to look at for the specific entry. 

 

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/retrieveauditdetails?view=d...

 

You could use a Power Automate button flow, using an HTTP action inside the flow to retrieve the audit information and return the result back to your Power App. The example below is slightly different than what you are trying to achieve, but demonstrates how to do the setup to make the HTTP call to Dataverse.

https://www.bythedevs.com/post/get-record-change-history-of-audited-entities-in-power-automate

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Hi @ChrisPiasecki 

 

Thanks very much for your reply.

 

I actually tried to do it in Power Automate to begin with and got so far without the using the API part, but I was missing the old value, new value and field that was changed which as you can imagine are all essential for an audit log.

 

The approach you sent over looks good and I'll definitely give that a try and see if I can get it working. Happy to mark as the solution if I can get it going. Will report back ASAP!

 

EDIT: with a bit of configuration this is showing me an old and new value of the field that was edited so should give me what I need.

Hi @ChrisPiasecki  @sammybridge 

 

I have studied the link you provided but I guess the "Get Record" is obsoleted? What is alternative I should use now?

 

JAWL_0-1648092629193.png

 

Hi @JAWL,

 

The Dataverse connector is what would be used now and the Get a row by id action.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Hi @ChrisPiasecki 

 

Appreciate your reply. However, I still could not wrap my head around how to populate the CDS's Item Identifier into Dataverse connector:

JAWL_0-1648097897788.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (1,315)