DataverseRecordRecovery 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package DataverseRecordRecovery --version 1.0.2
                    
NuGet\Install-Package DataverseRecordRecovery -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataverseRecordRecovery" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataverseRecordRecovery" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DataverseRecordRecovery" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataverseRecordRecovery --version 1.0.2
                    
#r "nuget: DataverseRecordRecovery, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DataverseRecordRecovery@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DataverseRecordRecovery&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=DataverseRecordRecovery&version=1.0.2
                    
Install as a Cake Tool

Dataverse Record Recovery (XrmToolBox plugin)

Find records deleted from a Dynamics 365 / Dataverse table in the audit history, review what they looked like before their deletion, and restore them with their original GUID — together with the related records deleted in cascade, their missing parents, their N:N associations and their status.

Usage

  1. Connect to an environment. The header shows the connected environment; Reload tables refreshes the tables and users.
  2. Find deleted records (step 1):
    • Table: the table whose deleted records you are looking for. Only tables with auditing on is ticked by default; untick it to also list tables whose auditing is now disabled.
    • Deleted by: a user, or (All users).
    • Deleted from / To: the date range, in local time.
    • Max records: maximum number of deletions loaded by a search (500 by default).
    • Also restore related records deleted in cascade, within N seconds before or after each deletion (120 seconds by default).
    • Click Search.
  3. Select the records to restore (step 2): tick the records (Check all / Uncheck all). Click a row to see its Values before deletion. Records that exist again are hidden.
  4. Click Preview and restore. The review dialog shows the records to restore as a tree, parents first:
    • Missing parent, Selected and Related records, plus the N:N associations and the linked records that will be restored.
    • Record details: previous value, restored or not, and a note for each column.
    • Uncheck the records you do not want to restore.
    • Options: Keep the original Created On date, Do not run custom plug-ins and flows while restoring.
    • Tick the approval box and click Restore N record(s). Nothing is written before this.
  5. The Recovery log gives the result of each record (Restored, Restored with warnings, Skipped, Failed); double-click a row to read its full message. The tool then offers to open the restored records in the browser.

The interface is available in English and French (language selector in the header). Filters and options are remembered between sessions.

What gets restored

  • The selected records, created again with their original GUID and the column values stored in the audit history. Columns managed by the system or that no longer exist in the table are skipped and shown greyed in the preview.
  • Related records deleted in cascade: deletions of child tables found in the audit history around each deletion (time window from step 1), searched level by level.
  • Missing parents: records referenced by a lookup that were deleted too and can be found in the audit history. They are restored before the records that reference them. If a referenced record no longer exists and its deletion cannot be found, the lookup is left empty and a warning is shown.
  • Owner: the original owner is kept when possible; otherwise the record belongs to you and a warning explains why.
  • Status: set back right after the creation. Cases are closed with CloseIncident and opportunities with WinOpportunity / LoseOpportunity, which create the closing activity Dataverse expects.
  • N:N associations: rebuilt by replaying the associations and disassociations of the record's audit history up to its deletion, then associated again once every record exists.
  • Unlinked records: records that were not deleted but whose lookup was emptied by the deletion are linked back to the restored record.

Records that already exist (same GUID) are never overwritten: they are left out of the plan and counted in the summary.

Things to know

  • Only records deleted while auditing was enabled on the organization and on the table can be found. Values that the audit history did not keep cannot be restored.
  • Searching requires the View Audit History and View Audit Summary privileges; restoring requires the Create privilege on each restored table. Skipping custom plug-ins and flows requires the Bypass custom plug-ins privilege. A clear message lists the missing privileges.
  • Without Keep the original Created On date, Created On is the restore date. Modified On, Modified By and other system columns are always set by Dataverse.
  • If more deletions than the search limit happened around a deletion, some related records may be missing from the plan; a warning tells you so.

Project layout

Folder Content
Dataverse Record Recovery/Services Audit history reading (AuditService), recovery plan and restore engine (RecoveryService), metadata cache, value formatting.
Dataverse Record Recovery/Models Deleted records, recovery plan, items and options.
Dataverse Record Recovery/Forms Review and confirmation dialog, themed message and text viewer dialogs.
Dataverse Record Recovery/UI Theme, icons, animated logo and custom controls (cards, buttons, tree view, loading overlay).
Dataverse Record Recovery/Localization English and French texts.
RecordRecoveryPlugin.cs, RecordRecoveryControl.cs (+ designer) XrmToolBox plugin and its screen.

Build

Open Dataverse Record Recovery.sln in Visual Studio and build, or:

msbuild "Dataverse Record Recovery.sln" /restore /p:Configuration=Release

Install in XrmToolBox

Install Dataverse Record Recovery from the XrmToolBox Tool Library, or copy Dataverse Record Recovery\bin\Release\DataverseRecordRecovery.dll to %APPDATA%\MscrmTools\XrmToolBox\Plugins, restart XrmToolBox and open Dataverse Record Recovery. A connection to the environment is required.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 311 10/17/2026
1.0.2 98 10/17/2026

1.0.2 - Package update

- Plugin assembly renamed DataverseRecordRecovery.dll (no spaces), as expected by the XrmToolBox Tool Library.
- No functional change.

1.0.1 - Package update

- Tool icon embedded in the package, so it shows in the XrmToolBox Tool Library.
- No functional change.

1.0.0 - First release

- Search deleted records in the audit history by table, user who deleted them and date range (local time), with a maximum number of records.
- Option to list only the tables whose auditing is on; warning when auditing is disabled in the environment.
- Values before deletion shown for each deleted record; records that exist again are hidden.
- Records restored with their original GUID, original owner when possible, and optionally their original Created On date.
- Related records deleted in cascade found around each deletion (configurable time window) and missing parent records restored first.
- Status restored after creation; cases and opportunities closed with their dedicated messages.
- N:N associations rebuilt from the audit history and unlinked records linked back.
- Review dialog with the recovery tree, previous / restored values per column, warnings and an explicit approval before any write.
- Optional bypass of custom plug-ins and flows during the restore.
- Recovery log with the result of each record, and an option to open the restored records in the browser.
- Clear messages for missing privileges, English and French interface, settings remembered between sessions.