1
votes

I am trying to get Audit records of Dynamics 365 CE using Microsoft Flow. I am getting the records from Audit Summery View but not the related old value to new value records. I am also not able to delete Audit records.

I have not been able to find any entity related to old value-new value that I can use in Microsoft Flow. I have tried to delete records from Microsoft Flow

I would like to get complete Audit entity records including those of old value-new value. Trying to delete records gives message "Delete method does not support entities of type 'Audit'. Is there any workaround for this?

2

2 Answers

0
votes

As far as I know, audit entity only supports Bulk delete and not delete. Also bulk delete can be performed for audit records older than specific date or months.

Here is what I found from docs of Microsoft

Audit logs are stored in blocks.  Each block contains approximately 3 months of logs.  You can only delete the oldest block and you cannot delete the block currently in use.

I did not tried with me flow getting old and new values but I was able to use c# code to successfully get old and new value of a audit record.

0
votes

Read this to understand the CRM Audit concept.

You can use RetrieveRecordChangeHistoryRequest for Audit data retrieval of particular record. Code sample in MS github

Particular audit entry can be deleted from the UI using a direct button. This is part of latest version. But I don’t think there’s a code piece/endpoint for the same. Reference

enter image description here