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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Can someone help me with the voodoo art that is AX Security?

(0) ShareShare
ReportReport
Posted on by 2,007

Hi all,

I've been struggling with a security issue in AX 2012 R2 for over a week and I'm finally to the point where I feel I've tapped out all of the resources on the internet and after following the instructions on how to use roles and privileges to secure a button (https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-use-roles-and-privileges-to-restrict-access-to-a-button) and STILL not getting it to work, I've decided to see if the community can help me out.

Here's my scenario. When we first implemented AX (AX2009) we had a third party VAR create a credit solution for us to lock sales orders if the customer in question was not credit worthy. To accomplish this, they added two new fields to the SalesTable and utilized the SalesTable.SalesType field to determine a credit hold (basically, if they are not credit worthy, the salestype is Journal) They then added a button to the SalesTable form to allow for a release of the hold. Anyone who can access the form can access the button, and it has been this way ever since we implemented AX back in 2011-12. 

Well we just discovered a few weeks ago that every sales person has the right to release their own holds. This function should only be allowed access by credit users so I created some classes to mimic the release button and a second function we want credit to perform, created menu items for these functions and then created a privilege that grants rights to the menu items. I then added the menu items to the form.

I have two roles--Sales and Credit. Effectively, we want to make it so Sales can edit all of the sales table, except for the salestype and the two custom fields I listed above. Conversely we want credit to ONLY be able to edit the salestype and the two custom fields. The buttons I created do that. But here's my problem--the Sales role has effective DELETE access to SalesTable. Credit has effective READ access to SalesTable. If I add the privilege to the Credit role the menu item buttons do not appear on the form for the credit user, even when I give the credit user UPDATE access to SalesTable through the privilege. However, on a hunch, I added the privilege to the Sales role and the buttons do appear when they have the privilege.

I've searched up and down on the internet looking for a solution but have come up empty. I am assuming that my issues likely have to do with the fact that Credit's rights are severely restricted in this instance. If I had it to do over, I would have had the VAR put the credit fields in their own table, but hindsight is always 20/20 and redesigning the solution, while an option, is something we'd really, really like to avoid.

Thanks for any advice you might have on this.

Brandt

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Brandt,

    You did add the menu item buttons on the form. Can you tell which exact value is used for the property NeededPermission? If this is set to Delete, the users should have delete access from the privilege. Try to see if the value 'None' will help here (default value, so not sure if you touched this property).

  • Brandt Fundak Profile Picture
    2,007 on at

    Andre,

    The controls were set to NeededPermission None, which I thought would show the buttons. I did change them to manual as outlined in the above link, but that didn't work either.

    Brandt

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Brandt,

    This is weird. Can you provide some more information about the menu items and privileges (properties used)? There are many privileges out of the box which do have read access and the form are showing menu buttons on the form, based on the privileges. Could it be a caching issue on the AOS?

    Alternatively, you can also use the old button-system and change the NeededPermission to 'Manual'. Nobody will then be able to see the button, unless you add the button as form control permission on the role or a privilege.

  • Brandt Fundak Profile Picture
    2,007 on at

    Andre,

    We did have an issue where sysadmins could not see the buttons when we originally added them and we had to reset the form personalizations. How would we clear the cache on the AOS? Bouncing it does not appear to be the solution...

    Brandt

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Brandt,

    Now I get your voodoo feeling... Have you also tried creating a new test user and then test the credit role? Clearing AOS cache can be forced by restarting the AOS. But try the new test user without any history first.

  • Verified answer
    Brandt Fundak Profile Picture
    2,007 on at

    Andre,

    Sorry for the late response, but it turns out you were on the right track with the problem, in that some bizarre caching issue was preventing other users from seeing the button. We ended up adding another tab to the Action Bar for our credit users and when we applied the proper security, the action tab and the buttons appeared. These issues did not occur when we actually moved the model store for this release into production, only when we created them in the development environment before checking them in to TFS.

    Thanks for pointing us in the right direction.

    Brandt

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans