> For the complete documentation index, see [llms.txt](https://dyns.ntd.asia/power-dynamics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dyns.ntd.asia/power-dynamics/power-platform/dataverse/recycle-bin-on-dataverse-preview.md).

# Recycle Bin on Dataverse (Preview)

## Recovering Deleted Data in Microsoft Dataverse

In Microsoft Dataverse, records or transactions can be deleted through various means - manually by users, automatically by system processes, or through bulk deletion actions. These deletions can occur intentionally or accidentally

The challenge lies in the recovery of deleted data. Historically, **restoring records in Dataverse** could be difficult, with some data potentially being permanently lost. To mitigate this issue, Microsoft provides a solution: the **Recycle bin.**

The **Recycle bin in Microsoft Dataverse** is designed to recover table record data regardless of how it was deleted—covering all deletion scenarios. This feature operates within a flexible, configurable timeframe, ensuring that users have a window in which they can retrieve their lost data.

Okay.. now\.. let's try this preview feature with me! :thumbsup:

## Enabling the "Recycle Bin" for an environment

In the Power Platform Admin Center > Setting > under the Feature setting: ***Enable Recycle bin for Dataverse table*** and specify the ***Time interval*** as below.

<figure><img src="/files/dWMPPxLsMhTd5h9XvpyR" alt=""><figcaption><p>Enabling the Recycle bin for Dataverse tables</p></figcaption></figure>

Next, wait at least 10 minutes for the configuration process to complete.

## How to restore deleted records?

<mark style="color:red;">**Restore deleted records:**</mark>

To restore deleted records, you go back to the Power Platform Admin Center > Select the environment and click **Setting**. After that, under **Data Managemen**t > click **"View Deleted Record (Preview).**&#x20;

<figure><img src="/files/n1TAwhoEHGVlKc4tFFw9" alt=""><figcaption><p>View Deleted Record (Preview)</p></figcaption></figure>

The system will show all deleted records and you can select one or multiple records that need to be restored. After that, click the button **Restore** to **recall data.**

<figure><img src="/files/xO4zKih17BHxPEK759oD" alt=""><figcaption><p>Restoring selected record</p></figcaption></figure>

and then, checking the record after restoring.

## Testing now\...

I will test my environment (without D365 Applications). I will separate the test case for data checking after restoring deleted records.

For instance, I will check on 2 entities:

* Parent entity: **Account**
* Child entity: **Deal**
* &#x20;The relationship: **Account&#x20;**<mark style="color:red;">**(1:n)**</mark>**&#x20;Deal**

<details>

<summary><mark style="color:red;">Test Case 1:</mark> Delete the child entity "Deal" with the lookup field "Account" containing data.</summary>

Expectation after **restoring** **deleted** **Deal** record: The ***Account*** field will be restored with the original data

<mark style="color:green;">**Before deleting:**</mark> Deal record - the Account field contains value "NTD Asia Corp"

<img src="/files/SUyeAexBWp1Shuovnj3K" alt="" data-size="original">

<mark style="color:green;">**After Restoring:**</mark> The testing passed. The Deal record has been restored successfully with the original Account field value.

<img src="/files/mCapPVOUI0YCcYDAIFDC" alt="" data-size="original">

</details>

<details>

<summary><mark style="color:red;">Test Case 2:</mark> Delete the parent entity "Account" associated with the Deal records.</summary>

I have 2 Deal records associated with the Account **"Hoang Quan Corp."** -> After deleting the Account "Hoang Quan Corp.", this value has been removed from 2 related Deal records before.

<img src="/files/CvGNxbFf7hQOjSyFD1M8" alt="" data-size="original">

Now, after **restoring the Account "Hoang Quan Corp."**, I hope that this value will be associated with Deal records before.

<mark style="color:green;">**After restoring:**</mark> The Account "Hoang Quan Corp." has been restored and associated with 2 Deal records before. -> The testing passed.

<img src="/files/zJy6Q99XBHn82wBH5Qe6" alt="" data-size="original">

</details>

Thank you for reading & Hoping well! :tada:\
\&#xNAN;**\[NTD]yns.asia**
