> For the complete documentation index, see [llms.txt](https://kb.bevica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.bevica.com/documentation/guides/permissions-and-security/advanced_permissions_salesperson_view.md). Agents can also search and read this documentation through its [MCP server](https://kb.bevica.com/~gitbook/mcp).

# Advanced Permissions: Salesperson View

Advanced setup to restrict visibility so salespeople only see their own customers and documents.

This article describes how to create a **Permission Set** so that a salesperson can only see records relating to their customers. The principal can be applied to any situation where you want to restrict records within a list.

{% hint style="warning" %}
**Prerequisites**

Understanding how permissions work. See links below for more details.

[Assign Permissions to Users and Groups](https://docs.microsoft.com/en-GB/dynamics365/business-central/ui-define-granular-permissions)

Using Security Filters.
{% endhint %}

### Setup

You need to create a **Permission Set** that allows salespeople to log on and navigate through the software correctly.

Start by taking a generic Permission Set, i.e. **D365 TEAM MEMBER** and copy it to a new permission set you can modify. Navigate or search for **Permissions** then select D365 TEAM MEMBER.

![Permission Sets list showing the D365 TEAM MEMBER permission set](https://2932934759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUgpGDVvyqBWVvwVIy9a%2Fuploads%2Fgit-blob-d871ac2385651e8b4ab7b5138592243d9d960378%2FuPy2CoKiDCjwrAuY_k-XDWVVtWOJY4fQ4Q.png?alt=media)

Select **Copy Permission Set** and give it an appropriate name, e.g. SALEPERSON BASE. This will be the parent permission set for all your salespeople.

On this new permission set, select **Permissions** from the ribbon and review its individual Object permissions. For example, it will have **Insert**, **Modify**, and **Delete** permissions which you may want to amend. It will also have **Read** permissions to areas you may not want them to (e.g. G/L Entry).

![Permissions list for a permission set, showing object permissions](https://2932934759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUgpGDVvyqBWVvwVIy9a%2Fuploads%2Fgit-blob-ccbd77d55c9e071e3ccbbb5768cf9dc35be2b37e%2Fyj8pq4wLvC_3sgVW6Cift8iCSy2bD373Pw.png?alt=media)

Once you have a **Permission Set** that allows the user to log on and navigate through the software as you want, you can create salesperson-specific permission sets that apply the salesperson filter.

{% hint style="info" %}
Achieving a functioning Permission Set involves trial and error. After modifying the permission set, ask someone to trial it and report back on any restrictions they encounter.
{% endhint %}

Copy this permission set, SALESPERSON BASE, and call it e.g. SALESPERSON AH (where AH is the salesperson code, so it's easy to find)

On the new permission set, go back to its permissions and apply **Security Filters** on the relevant tables on the Object Type of **Table Data**. Click on the assist edit.

![Security Filters assist edit for Table Data permissions](https://2932934759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUgpGDVvyqBWVvwVIy9a%2Fuploads%2Fgit-blob-b350cfc4c381bfa3951917685b3f3edf83185506%2F8dceJnvNtUnhBLrUZorJJfZRWzuEs8V4yA.png?alt=media)

Select the Field Number for Salesperson Code and add a Field Filter for the value, in this case, AH.

![Security Filter setup with Salesperson Code filtered to a single value](https://2932934759-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfUgpGDVvyqBWVvwVIy9a%2Fuploads%2Fgit-blob-6c43a805d63b3373907151568198ac6b915769d2%2FCGgXdvstCCdXRgJT82vxJscuz7Du13Ziqw.png?alt=media)

The tables which you will need to apply this to will need reviewing but as a minimum:

* 18 Customer
* 21 Customer Ledger Entry
* 36 Sales Header
* 37 Sales Line
* 112 Sales Invoice Header
* 113 Sales Invoice Line
* 110 Sales Shipment Header
* 114 Sales Cr. Memo Header
* 6660 Return Receipt Header


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.bevica.com/documentation/guides/permissions-and-security/advanced_permissions_salesperson_view.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
