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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

X++ code to assign menu item to roles

(0) ShareShare
ReportReport
Posted on by 95

Hey everyone.

I have a requirement, where I have to browse through all Output type Menu Items and assign them to multiple roles. It will take a whole lot of time if done manually.

Is there a way to achieve this through X++ code.

Please help urgent.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    It should take just some minutes.

    1. Create a new privilege

    2. In AOT, go to output menu items and select all of them (select the first one, scroll all the way down and Shift-select the last one. Now you have them all selected).

    3. Drag them to Entry points node of the new privilege

    4. Assign this privilege to your role(s)

  • Jie G Profile Picture
    Microsoft Employee on at

    Hi Ayush Thapliyal,

    After creating a role with the required privilege, you may refer this sample code for assigning the role to multiple users:

    dynamicsaxgyan.wordpress.com/.../adding-a-role-to-all-or-multiple-users-using-x-code-dynamics-ax-2012

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 4 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans