# Delete Record Protection

Data sync is a powerful tool that can have consequences if wrongly used. Delete Record Protection enables you to prevent unintended record deletion if you know that your use case does not requires deletion at all.

For example, let's say you have a Salesforce account connected to your Postgres database. If you don't want the deletion of records in your Postgres database to delete the synced record in your Salesforce, you can set up the delete record protection for Salesforce.&#x20;

## Set up

Once your sync is created, go on the Dashboard page, click on your sync and then on the app where you don't want the records to not be deleted.

<br>

<div align="center" data-full-width="false"><figure><img src="/files/XDEFPGCHUzPXN6t0wcRO" alt=""><figcaption></figcaption></figure></div>

<figure><img src="/files/qAPYbN0M6PY27I9zGNwF" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Upon <mark style="color:red;">**deactivation**</mark> of the delete protection, all the records that should have been deleted if the record protection was not on will get <mark style="color:red;">**deleted**</mark> instantaneously. This is a <mark style="color:red;">**non revertible**</mark> operation.
{% endhint %}

Delete Record Protection also works for 1-way syncs.

You can activate the delete record protection for both apps at the same time. When a record will be deleted in any of the apps, it won't be deleted in the other app.

You can track at any point in time the number of **delete protected records** from the [sync statistics section](/two-way-sync/features/other-features/sync-statistics.md) of each sync.

<figure><img src="/files/zjm5AFzELzAKFYubsA0Y" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stacksync.com/two-way-sync/features/delete-record-protection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
