Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to restrict field modifications on pages depending on the user and the new value

Posted on by Microsoft Employee

Hello,

I would like to know if there is a way to allow or forbid a table field modification depending on the user and the value, for example:

User A should be allowed to modify the field "status" of the "customer-account" page from "active" to "blocked" but not from "blocked" to "active".

User B should be allowed to do the opposite, modify the customer-account status from "blocked" to "active" but not the other way around.

With the standard NAV permissions we can simply grant edit/read/... accesses to objects, but this kind of permission is not feasible.

I was wondering if there was a way of implemeting a modifications matrix or similar, that could allow me to do this in an elegant fashion...

*This post is locked for comments

  • Suggested answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: How to restrict field modifications on pages depending on the user and the new value

    As you wanted to have a setup for the user permission, my suggestion is to create a separate table or modify the user setup table. In the table, add two new boolean fields and at the time of user change the status (onValidate) write a code to check the user permission.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: How to restrict field modifications on pages depending on the user and the new value

    There is not standard functionality for this, you have to customize to achieve this. There is an add-on called Easy Security you can use to control which fields to be editable,hidden.. but i don't think that even has the option to control the value of the field.

    The easy way is as Mohana mentioned control it by user setup but if you have this kind of requirement for other fields then you need to think of about creating some kind of customized permission setup for fields, tables and the values.

    mergetool.com/.../easysecurity.html

  • Saurabh Shah Profile Picture
    Saurabh Shah 4,560 on at
    RE: How to restrict field modifications on pages depending on the user and the new value

    I agree with Mohana and also doing the same.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: How to restrict field modifications on pages depending on the user and the new value

    The solution running in my mind at present is:

    create 2 Boolean fields in user setup table and activate then as you needed.

    Check the setup while validating the field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans