web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Field Level Restriction in Security Framework in Microsoft Dynamics 365 Finance and Operations

Ramit Paul Profile Picture Ramit Paul 22,797 Most Valuable Professional

Dear Microsoft BizApps Community,

Welcome to my next blog on security framework, this article talks about how we can impose a field level restriction for users in a form

Problem statement

A very common requirement from customer, they want to put a restriction on a form for some fields, which won’t be editable by users, due to audit or internal control purpose

Business scenario

Example- in vendor master, bank account field won’t be editable by end users, only admin team can change that (note- this is just an example scenario; however, this approach and solution should work for other forms too)

The below output is our expectation, where Bank account fields are non-editable, other fields are editable

pastedimage1653853567116v17.png

Let’s explore

Configuration

We shall see the solution by creating a duty->>>> Privilege->>> table->>>field level restriction

Step 1- Create a new duty (for our case, we shall create the duty as CS_vendBank name)

Navigate to system administration->>security->>Security configuration

Go to duty tab and create new

 pastedimage1653852806524v1.png

Enter a duty name and ok

pastedimage1653852828765v2.png

Step 2- Create a privilege for the newly created duty

Now select the newly created duty->> and select Privileges, see below

 pastedimage1653852847661v3.png

 

Now “Create new and add reference”, see below

pastedimage1653852868716v4.png

Now Give a name to the privilege, it will create a new privilege

 pastedimage1653852929589v6.png

Step 3- Add a table and add field level restriction (vendtable is in our case and BankAccount is the field which we want to restrict)

Select the duty->> Select the privilege-> select table tab as shown below->> add reference->> select the table name (for our case its vendtable)

 pastedimage1653852947184v7.png

 

From vendtable- grant each and every properties->> ok

 pastedimage1653852979814v8.png

Now select the table (vendtable in in our case, as shown below) and then add reference

 pastedimage1653853002346v9.png

 

Now the main part is- add the field “BankAccount” in our case on which we want to disallow users from updating the field, in short should be un-editable)

Hence, from read access it should be “Grant”, and from update access, it should be “deny”->>ok

 pastedimage1653853027559v10.png

Step 4- create a role- Now the last part is- create new role and add the duty we have crated as “CS_vendBank”, also we can add the privilege or the duty to the existing role as well.

 pastedimage1653853077104v11.png

pastedimage1653853103206v12.png 

Now add the Duty “Cs_vendbank” to this role from “add reference” option->ok

pastedimage1653853124724v13.png 

pastedimage1653853143358v14.png

 

The setup is done, however the above changes we have done, we need to publish from “Unpublished objects” tab, you may select “Publish all”

 pastedimage1653853162935v15.png

 

The configurations are done

Let’s check how it will look like if this role is assigned to users

See below, all the fields are now editable except only the Bank account fields, on which we have added restrictions

 pastedimage1653853177250v16.png

 

By the above configurations we can achieve the field level restriction without a single line of code

This is it for this blog, stay tuned for my next article

Comments

*This post is locked for comments