---
title: "Preventing product sales in a location"
slug: "preventing-product-sales-in-a-location"
updated: 2022-05-04T12:15:01Z
published: 2022-05-04T12:15:01Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preventing product sales in a location

This validation rule will prevent any product sale in the specified location. Customers and admins alike won't be able to purchase any product available in this location's inventory.

          You need your **Location reference** to create this validation rule.

          

You can find your *Location reference* via **Settings > General settings** on the Admin Panel.

![image.png](https://cdn.document360.io/4f9a66c7-3dbb-4052-97d8-5439302e1512/Images/Documentation/image%28568%29.png)

*Make sure you copy and save it before starting the rule setup*

---

1. Log in to [dashboard.nexudus.com](https://dashboard.nexudus.com/) if you aren't already.
2. Click [**Settings > Validation rules**](https://dashboard.nexudus.com/settings/3/0/0).
3. Click **Add rule**.
4. Click on **Manual entry**.
5. **Name** your rule.
6. Add a **Description** of the rule.
7. Enable the **This rule is active** toggle.
8. Select **Product sale** in the **Record type** drop-down list.
9. Add the **Error message to display if the validation rule is not met**.
10. Add the following snippet in the **Formula** field.

```
record.Business.Id <>
```

1. Add your *Location reference* at the end of the **Formula** field.

Your validation rule should now look like the example below, with your own location ID instead of *123456* in the **Formula**.

![image.png](https://cdn.document360.io/4f9a66c7-3dbb-4052-97d8-5439302e1512/Images/Documentation/image%28569%29.png)

1. Click the **Save Changes** button.

---

Your validation rule is now live. Customers and admins alike shouldn't be able to purchase any product from this location.
