Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Access denied to the field error due to security role

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to hide a field in the form from some users so I have created a security role for this purpose. I gave full permission to the table but gave "access denied" to that field. Now whenever the user with that role opens the form, he doesn't see the field along with the error "access denied to the field". Somewhere in the back of the code,  the exception occurs when that field is hit. Although I have added if condition but it doesn't work. This field in the table has AOS authorization true on it and the table is out of the box.

  • André Arnaud de Calavon Profile Picture
    295,466 Super User 2025 Season 1 on at
    RE: Access denied to the field error due to security role

    Hi ERP Community,

    When you get the error when changing the TaxIdType enum, there is probably some coding executed which tries to access the Tax1099RegNum field. Then indeed, you can expect an error.

    Should the user be able to change the enum? If not, you can consider making that field read only. If the user needs to be able to change it, you would probably need a customization to remove the field from the form and ensure the user will not be able to see the value in a different way (e.g. show all fields).

  • Community Member Profile Picture
    on at
    RE: Access denied to the field error due to security role

    Hi,

    Thanks. After implementing the solution, the error doesn't appear as long as I do not modify the TaxIdType enum. As I modify this field, the same error appears 

    What do you suggest in this matter?

    Thanks for the reply!

  • André Arnaud de Calavon Profile Picture
    295,466 Super User 2025 Season 1 on at
    RE: Access denied to the field error due to security role

    Hi,

    I just tried it on a preview of 10.0.27 using the Security configuration form in the application. I didn't get the additional error. Can you tell if you have a similar setup as I will mention below or did you create the security different (other privileges or using Visual Studio based development)?

    I provided a role with the standard duty (with the standard privileges) for maintaining vendor master. With a second role, I added a new privilege with deny permissions for the specific field via the table permissions node. Just a new privilege with the deny access on the same role should also work fine.

  • Community Member Profile Picture
    on at
    RE: Access denied to the field error due to security role

    Hi,

    The version of the product that I am using right now is 10.0.25 (10.0.1149.40).

    The table I am working on is vendTable and the field is Tax1099RegNum.

    Thanks

  • André Arnaud de Calavon Profile Picture
    295,466 Super User 2025 Season 1 on at
    RE: Access denied to the field error due to security role

    Hi ERP Community,

    What exact version of Dynamics 365 F&O are you running? Can you tell which exact field on what table you try to restrict?

  • Suggested answer
    abdultp Profile Picture
    867 on at
    RE: Access denied to the field error due to security role

    If you want to do it on table level from UI, the minimum access needs to be granted is 'read' which is completely against basic idea of hiding the Field as you mentioned. If you deny the read permission for a field it'll throw the error and user will not have access to the form.

  • Community Member Profile Picture
    on at
    RE: Access denied to the field error due to security role

    Thanks for your swift response. However, I was thinking is there any possible way of doing it on table level other than on form level as it can cause other issues in business logic.

  • Suggested answer
    abdultp Profile Picture
    867 on at
    RE: Access denied to the field error due to security role

    Hi,

    Extend the form if it's standard one, then in design section of form go to the the form control which you want to hide & change the needed permission to 'Manual'.

    Find the privilege for the role where this display menu item is assigned to the entry point & add the same form control which you wanted to hide with the permission of 'Read'.

    Assign the role to the users who shouldn't be able to view that field. Refer the below images for better understanding through standard form & Privilege.

    pastedimage1652902359758v1.png

    pastedimage1652902458307v2.png

  • Community Member Profile Picture
    on at
    RE: Access denied to the field error due to security role

    I have tried numerous solutions but nothing worked. Kindly help me get through it. Thanks in advance!

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 601 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 416

#3
Adis Profile Picture

Adis 384 Super User 2025 Season 1

Product updates

Dynamics 365 release plans