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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Wizard Form – Open Directly on 3rd Tab While Allowing Navigation to Previous Tabs

(0) ShareShare
ReportReport
Posted on by 85

Hi Everyone,

In Dynamics 365 Finance & Operations, we can configure the Visibility property for menu items and submenus in the AOT.

Is there a way to check or retrieve the Visibility property of a menu item or submenu using X++ code at runtime?

For example, I would like to determine whether a particular menu item or submenu is configured as visible/hidden in the AOT and use that information in my X++ logic.

Could someone please provide guidance or an example of how to achieve this in X++?

Categories:
  • Suggested answer
    CU-1234529-002 Profile Picture
    527 on at

    Hi,This isn't a setTab()/activate() issue it's likely your wizard's internal "enabled/visited page" tracking. Jumping straight to tab 3 changes the active tab, but doesn't mark tabs 1–2 as visited/enabled, so the wizard still blocks navigating back to them.

    Fix: When opening directly on tab 3, explicitly mark tabs 1 and 2 as enabled in your wizard's tracking logic before/alongside setting the current tab not just move the page pointer.

    Check your tab enabled() method overrides there's likely a "max visited page" check gating navigation. setTab() only updates the current tab, not that gating variable

    Thanks 

  • BM-31070523-0 Profile Picture
    85 on at

    Hi @CU-1234529-002 thanks for the explanation. I understand that the issue may be related to the wizard’s internal page-tracking or navigation logic rather than setTab() or activate() itself.

    I have already tried explicitly marking the previous tabs as enabled, but unfortunately, that did not resolve the issue. I can open the wizard directly on the 3rd tab, but I still cannot navigate back to the 1st or 2nd tabs.

    Could you please provide a little more detail about the approach you are suggesting? Specifically:

    • Which internal tracking variable or method should I look for in the wizard?

    • How can I identify whether there is a “max visited page” or similar navigation check?

    • Should I update the tracking state before calling setTab()?

    • Could you provide a small X++ example showing how you would implement this?

    Sorry if I misunderstood your earlier explanation. I’d appreciate a more concrete example of the approach you have in mind so I can apply it to my wizard.

  • CU-1234529-002 Profile Picture
    527 on at

    Hi,

    The fix likely needs two things together: update the tracking variable and call SetTab() not just setTab alone.

    public void init() { super(); if (openedFromFormA) { maxTabReached = 3; // update tracking state (name varies per wizard) this.setTab(3); // then move the tab pointer } }

    Search your wizard class for a variable/method with "Tab" + "enabled"/"visited"/"max" in the name  that's where the gating check lives (e.g. tabNum <= maxTabReached). Share your wizard's base class or that method, and I can give the exact fix instead of a generic one.

  • BM-31070523-0 Profile Picture
    85 on at

    Hi @CU-1234529-002 thanks for your reply.

    There is no method with the pattern "Tab" + "enabled" / "visited" / "max".

    However, please check the following methods to see if they are useful:

    • skipTab

    • setTab

    • curTab

  • Suggested answer
    CU-1234529-002 Profile Picture
    527 on at

    Hi, what's probably happening. If you (or the wizard logic) used skipTab to jump straight to tab 3, that's very likely the problem, not something separate.

    skipTab doesn't just control the initial jump forward — it also affects backward navigation. If skipTab(1, true) and skipTab(2, true) are set (to skip past tabs 1 and 2 on the way to tab 3), the wizard's back() navigation will also skip over those tabs when the user clicks Back — because as far as the wizard's internal state is concerned, those tabs are marked "skip" in both directions, not just "skip going forward."

    That matches your symptom exactly: you can land on tab 3, but can't get back to 1 or 2 — because they're flagged to be skipped entirely.

    The fix: Use skipTab only to control the initial jump, then reset it back to false once you're on tab 3, so Back/forward navigation treats tabs 1 and 2 as normal again:

    public void init()
    {
       super();

       if (openedFromFormA)
       {
           // Skip tabs 1 and 2 only to land directly on tab 3
           this.skipTab(1, true);
           this.skipTab(2, true);
           this.setTab(3);

           // Reset immediately after, so Back navigation isn't blocked
           this.skipTab(1, false);
           this.skipTab(2, false);
       }
    }


    This way, the initial open still lands on tab 3 directly, but since skipTab is reset to false right after, the Back button will navigate through tabs 2 and 1 normally instead of skipping past them.

    Try this and let us know if it resolves the back-navigation issue.

  • BM-31070523-0 Profile Picture
    85 on at

    Hi @CU-1234529-002 thanks for your suggestion but it did not work.

    Can you please suggest any other approaches to check out?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 507 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 419 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 155

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans