5.2 Menus, Menu Items & Navigation
Key Takeaways
- Menu items in Dynamics 365 are categorized into three distinct functional types: Display (launches interactive forms), Output (triggers SSRS reports and document generation), and Action (executes business logic classes, batch jobs, and posting routines).
- Menu items represent the fundamental Entry Points for role-based security; security privileges grant permissions (Read, Update, Create, Correct, Delete) to entry points, which automatically govern access to the underlying form, report, or class.
- The NeedsRecord property controls runtime button availability: setting NeedsRecord = Yes ensures the menu item is enabled only when a valid record buffer is actively selected in the active form data source.
- Menu item properties such as ConfigurationKey and CountryRegionCodes enforce declarative system-level filtering, hiding menu items from the navigation pane and ActionPanes if a feature key is disabled or if the current legal entity address is outside the specified ISO country codes.
- Navigation in Dynamics 365 is extended by creating menu extensions (such as MainMenu.Extension or module menus like AccountsReceivable.Extension), allowing developers to insert custom submenus and menu item references into standard groups without overlayering.
5.2 Menus, Menu Items & Navigation
Quick Answer: Dynamics 365 Finance and Operations abstracts user navigation, command execution, and security through Menu Items. There are three specialized types of menu items: Display (opens forms for interactive viewing and editing), Output (launches SSRS reports, Electronic Reporting formats, or report controllers), and Action (executes X++ classes, batch jobs, or transaction posting logic). Menu items define critical runtime properties including
Object,ObjectType,Parameters,ConfigurationKey,CountryRegionCodes, andNeedsRecord. In the security architecture, menu items serve as the Entry Points within Security Privileges. Users cannot interact with a form, report, or class unless they are assigned a security role granting access to the corresponding menu item entry point.
1. The Dynamics 365 Navigation Framework
The web client navigation framework provides unified access to all functional modules, workspaces, and setup areas across the ERP application.
Primary Navigation Components
- Navigation Pane (Left Drawer): Hosts high-level navigation categories:
- Workspaces: Curated, role-specific landing pages displaying tiles, lists, and links.
- Modules: Complete alphabetical catalog of functional areas (e.g., Accounts payable, General ledger, Warehouse management).
- Favorites: Personal pinned shortcuts configured by individual users.
- Recent: Chronological history of recently visited forms and workspaces.
- Navigation Search (Alt+G): Global search bar located in the top navigation ribbon. Users search for forms or workspaces by typing terms (e.g., "All sales orders"). The search engine indexes labels and descriptions of all menu items flagged with
WebSearchResult = Yes. - Direct URL Navigation (Deep Linking): Forms can be launched directly using URL query parameters:
https://<environment>.operations.dynamics.com/?cmp=USMF&mi=CustTablecmp: The target Legal Entity context (Company ID, e.g.,USMF).mi: The target Menu Item name (e.g.,CustTable), not the physical form name.
2. Menu Item Architecture & Types
A Menu Item is an AOT pointer that decouples the visual navigation trigger (buttons, links, menu nodes) from the target object being executed. This indirection ensures that security, parameter passing, and regional filtering are managed in one centralized metadata definition.
Navigation Trigger (Navigation Pane / ActionPane Button / Search Alt+G)
│
└── Menu Item Reference (Display, Output, or Action)
│
├── Security Layer: Entry Point on Security Privilege (AccessLevel: Read..Delete)
├── Environment Filter: ConfigurationKey & CountryRegionCodes
└── Execution Layer: Constructs Args object -> Launches Target Object
The Three Menu Item Types
| Feature | Display Menu Item (AxMenuItemDisplay) | Output Menu Item (AxMenuItemOutput) | Action Menu Item (AxMenuItemAction) |
|---|---|---|---|
| Primary Role | Opens interactive user interface forms. | Executes reports, printing engines, and inquiry documents. | Executes transactional business logic, batch jobs, and calculations. |
Allowed ObjectType | Form | Report, Class | Class |
| Target Examples | CustTable, SalesTable, InventItemId | CustAccountStatementExt, SalesInvoiceReport | SalesFormLetter_Invoice, InventClosing |
| Underlying Class Base | FormRun | SrsReportRunController, ERFormatMappingRun | SysOperationServiceController, RunBaseBatch |
| Default Security Intent | View, edit, create, or delete records in UI. | Generate and view formatted operational reports. | Execute state-changing operations or background tasks. |
3. Key Properties of Menu Items
Menu item properties control runtime behavior, environment filtering, and data passing:
1. Object and ObjectType
Object: Specifies the exact AOT name of the target artifact (e.g.,CustTablefor a form,SalesInvoiceControllerfor a class).ObjectType: Dictates the target artifact category (Formfor Display;ReportorClassfor Output;Classfor Action).
2. Parameters & Enum Parameters
Parameters: A literal string passed to the target object via_args.parm(). Often used when a single generic form handles multiple operational modes (e.g., passing"Vendor"vs"Customer"to a shared address inquiry form).EnumTypeParameter&EnumParameter: Passes a strongly-typed enumeration value via_args.parmEnumType()and_args.parmEnum(). For example, opening a sales order list filtered specifically to open orders by settingEnumTypeParameter = SalesStatusandEnumParameter = Backorder.
3. NeedsRecord
- When set to
Yes, the button or link referencing this menu item is automatically disabled in the UI unless an active record row is selected in the calling grid or form data source. - Prevents runtime null-pointer exceptions when user actions depend on a specific record context (such as recalculating a discount for an active sales line).
4. MultiSelect
- Controls whether the menu item can be executed when multiple rows are highlighted in a grid.
- If set to
No, selecting multiple rows in the client disables the button. - If set to
Yes, the calling form packages the selected records into the_argsobject usingFormDataSource.getFirst(1)andFormDataSource.getNext().
5. ConfigurationKey
- Associates the menu item with a system license or feature configuration key (e.g.,
Asset,Retail,PublicSector). - If the configuration key is disabled in License Configuration, the menu item is completely stripped from the UI and cannot be accessed by any user, including System Administrators.
6. CountryRegionCodes
- A comma-separated list of ISO 3166-1 alpha-2 country codes (e.g.,
US, CA, MX, orDE, AT). - At runtime, the client compares these codes against the primary address country of the active Legal Entity (Company).
- If the active company's country does not match, the menu item is hidden from the navigation pane and ActionPanes.
7. WebSearchResult
- A boolean (
Yes/No) indicating whether the menu item appears in the global Navigation Search (Alt+G) dropdown. - Set to
Nofor secondary child buttons, dialog helpers, or sub-processes to avoid cluttering search results.
4. Menu Extensions: Extending Navigation Without Overlayering
Standard menus in Dynamics 365 cannot be overlayered. Developers extend the navigation structure by creating Menu Extensions.
Extending MainMenu and Module Menus
MainMenuExtension (MainMenu.Extension): Used to add entirely new top-level functional modules to the Navigation Pane drawer.- Module Menu Extensions (e.g.,
AccountsReceivable.Extension,ProcurementAndSourcingMenu.Extension):- Standard module menus organize navigation into four standard submenus:
Common,Inquiries,Reports, andSetup. - Developers add references to custom Display, Output, or Action menu items directly into these existing submenus.
- Developers can also create new custom submenus within the module menu.
- Standard module menus organize navigation into four standard submenus:
Positioning in Menu Extensions
When adding a menu item reference or submenu via extension, developers define its visual placement using the Position property:
First/Last: Places the item at the start or end of the group.After: <TargetMenuItem>: Inserts the item immediately following a specified standard menu item.Before: <TargetMenuItem>: Inserts the item immediately preceding a specified standard menu item.
[!IMPORTANT] Menu Extension Limitation: You cannot remove or delete standard menu items from an existing menu via extensions. You can only add new menu items, create new submenus, and organize custom navigation nodes.
5. Security Linkage: Menu Items as Entry Points
Dynamics 365 Finance and Operations enforces a strict Role-Based Security Architecture (RBAC):
Security Role (Job function, e.g., Accounts Receivable Clerk)
│
└── Security Duty (Business process task, e.g., Maintain customer master data)
│
└── Security Privilege (Granular action, e.g., Edit customer records)
│
└── Entry Point (Direct pointer to a Menu Item)
└── AccessLevel: Read | Update | Create | Correct | Delete
Entry Points in Security Privileges
- Under a Security Privilege, developers add an Entry Point node.
- The Entry Point has an
ObjectTypeproperty (MenuItemDisplay,MenuItemOutput, orMenuItemAction) and anObjectNameproperty referencing the menu item. AccessLevelProperty: Dictates the maximum permission granted to the underlying object:NoAccess: Explicitly denies access.Read: User can view data; forms render in read-only mode, fields cannot be modified, and New/Delete buttons are hidden.Update: User can view and edit existing records, but cannot create new records or delete records.Create: User can view, edit, and create new records, but cannot delete records.Correct: Used primarily in temporal/dated tables to modify past historical records.Delete: Complete operational permissions (view, edit, insert, and delete).
Permission Cascading
When a user accesses a form via a Display menu item entry point granted with Read access, the runtime security kernel automatically cascades Read access down to all form data sources and child controls. Unless explicit form control permissions override this behavior, developers do not need to secure individual form fields manually.
6. Scenario Walk-Through: Creating an Action Menu Item with Parameterized Security
Business Scenario
Contoso Manufacturing requires a command button on the All Sales Orders form that triggers an asynchronous credit re-evaluation process for the selected sales order. The button must only be active when a sales order row is highlighted. In addition, only users assigned to the Credit Specialist role should have permission to execute the action.
Implementation Steps
- Develop Service Controller Class:
- Create class
ContosoSalesCreditEvalControllerextendingSysOperationServiceController. - Implement static method
main(Args _args)that inspects_args.record()for an activeSalesTablebuffer.
- Create class
- Create Action Menu Item:
- In Visual Studio, add a new Action Menu Item named
ContosoSalesCreditEvalAction. - Set properties:
Object = ContosoSalesCreditEvalControllerObjectType = ClassLabel = @ContosoLabels:EvaluateCreditTitleNeedsRecord = Yes(Crucial: ensures button is disabled if no order row is selected)MultiSelect = No
- In Visual Studio, add a new Action Menu Item named
- Insert Button into Form ActionPane:
- Create a form extension for
SalesTable(SalesTable.ContosoExt). - Locate
ActionPane > ActionPaneTabManage > ButtonGroupCredit. - Add a
MenuFunctionButtonreferencingContosoSalesCreditEvalAction.
- Create a form extension for
- Create Security Privilege & Entry Point:
- Create Security Privilege
ContosoSalesCreditEvalPrivilege. - Add an Entry Point named
ContosoSalesCreditEvalActionwithObjectType = MenuItemAction. - Set
AccessLevel = Update(permits executing business logic).
- Create Security Privilege
- Link to Security Duty:
- Extend standard duty
CustCreditManagementMaintainand addContosoSalesCreditEvalPrivilege.
- Extend standard duty
7. Real-World Exam Traps: Menus, Menu Items & Navigation
[!WARNING] Exam Trap 1: Using the Wrong Menu Item Type for Classes or Reports A recurring MB-500 exam scenario presents a requirement to run an SSRS report from a button and asks which menu item to create. Selecting a Display menu item is incorrect. Running SSRS reports or report controller classes strictly requires an Output menu item. Running batch jobs or operational classes requires an Action menu item.
[!WARNING] Exam Trap 2: Forgetting
NeedsRecord = YesLeads to Null Buffer Errors When an ActionPane button executes logic dependent on the current row buffer (e.g.,salesTable = _args.record()), failing to setNeedsRecord = Yesallows users to click the button when the grid is empty or during form load, triggering runtime null reference exceptions in X++.
[!WARNING] Exam Trap 3: Confusing Configuration Keys with User Security If a menu item is missing for a user who possesses the System Administrator role, candidates often mistakenly assume a security role or privilege issue. System Administrators bypass all security roles and duties. If a menu item is invisible even to a System Administrator, the cause is an inactive
ConfigurationKeyor a mismatch inCountryRegionCodes.
[!WARNING] Exam Trap 4: Direct Form Assignment in Security Privileges In modern Dynamics 365 Finance and Operations, forms and classes cannot be assigned directly as entry points on security privileges. Entry points must point to Menu Items. The menu item acts as the indispensable security gatekeeper.
A developer is creating a menu item to invoke an X++ batch processing class that recalculates inventory depreciation overnight. The class implements a static main method and extends SysOperationServiceController. Which menu item type and target ObjectType must the developer create?
A custom button on an ActionPane executes an X++ service that recalculates freight surcharges for a selected customer. If an end user opens the form and clicks this button before any customer row is selected in the grid, the code throws a null record buffer error. Which menu item property must be configured to prevent the button from being clicked when no row is selected?
In the Dynamics 365 Finance and Operations role-based security model, how are user permissions to access interactive forms, execute classes, and generate SSRS reports established?
A multinational corporation implements a custom tax adjustment form intended exclusively for legal entities operating in Germany and Austria. Users in the United States legal entity report seeing the menu item in their navigation pane, even though they cannot post transactions. How should the developer configure the menu item metadata so it automatically disappears from the navigation pane for non-qualifying legal entities?