web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Audit History OldValue...
Power Apps
Unanswered

Audit History OldValues and NewValues field display Name

(0) ShareShare
ReportReport
Posted on by 15

Hope someone can help.

 

Requirement is to display Field value changes for a record in a PowerApp.

So far, I've built a Flow and used the Web API Endpoints to get the data I need.

 

Firstly, I'm using this URL endpoint:

https://XXXXXXXXXX.crm6.dynamics.com/api/data/v9.0/audits?$filter=_objectid_value eq f7ec2519-49f6-eb41-94ef-000d1acbb602

to find the correct changes for the specified record. 

 

This bit is working find and I then get the audit id's for the records that have been updated.

 

Then, I issue another Http Request as per below:

https://xxxxxxxxxxxxxx.crm6.dynamics.com/api/data/v9.1/audits(d258ca98-59f6-bb11-a513-501ac5fd36c3)/Microsoft.Dynamics.CRM.RetrieveAuditDetails

 

This gets me a JSON result which contains a Object of type AuditDetail which contains an array of OldValue,NewValue.  The problem is that the Column names in this result is the CRM/Dataverse internal names. I need to show the user the display names of these fields. Here's a redacted JSON result:

{"@odata.context":"https://xxxxxxxxxxx.crm6.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.RetrieveAuditDetailsResponse","AuditDetail":{"@odata.type":"#Microsoft.Dynamics.CRM.AttributeAuditDetail","InvalidNewValueAttributes":[],"LocLabelLanguageCode":0,"DeletedAttributes":{"Count":0,"Keys":[],"Values":[]},"OldValue":{"@odata.type":"#Microsoft.Dynamics.CRM.cree8_zzzzzzzzzz","cree8_categorydescription":"Top Action","cree8_startdate":"2021-08-06"},"NewValue":{"@odata.type":"#Microsoft.Dynamics.CRM.cree8_xxxxxxxxxxxxxxx","cree8_actiontag":"#AwesomeTag;","cree8_categorydescription":"bbbbbbbbbbbbbbbbbbbbbbb","cree8_startdate":"2021-08-12"}}}

Any advice on how to get the this JSON in a better format that shows the field display names? Obviously I can do further API Requests to get a list of all field names, but that sounds like a lot of unnecessary JSON parsing if there is a better endpoint of perhaps a Query string modified that I'm missing.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard