
Announcements
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:
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.