languages | products | page_type | description | |||
---|---|---|---|---|---|---|
|
|
sample |
Sample that shows how to enable and disable auditing on a table and its columns in Microsoft Dataverse. [SOAP] |
This sample shows how to enable and disable auditing on a table and its columns, retrieve the data change history of the audited table, and delete the audit records.
See How to run samples for information about how to run this sample.
The RetrieveRecordChangeHistoryRequest
message is intended to be used in a scenario where it contains data that is needed to retrieve the audit history for a table.
In order to simulate the scenario described in What this sample does, the sample will do the following:
- Checks for the current version of the org.
- Creates an sample account table.
- Gets the organization's ID from the system user record.
- Enabling auditing on organization and also on the sample account table.
- The
RetrieveRecordChangeHistoryRequest
retrieves the audit history for the account table and displays the result.
Display an option to delete the sample data that is created in Setup. The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.