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)

How to keep "Show in content area" when form is open by menuitem from code?

(0) ShareShare
ReportReport
Posted on by

On few places in our application we open ListPage in content area. On the address line there is something like "Company/Module/Folder". On that listpages are menuitems which calls class which create menuitem and open the new ListPage form like:

Args args = new Args();
str param = 'Something';
MenuFunction openProjects = new MenuFunction('ListPageName',MenuItemType::Display);

args.parm(param);
openProjects.run(args);

 

When it called like that the address degenerate to "Company/"

 

How to keep the location (at least when the same ListPage is just reopen with different parameters)?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Normally the display of that path depends on parameter "IsDisplayedInContentArea=Yes" on menu but I do not know how to set this in code.

  • Community Member Profile Picture
    on at

    I need to create MenuItem instead of MenuFunction and set MenuItem.isDisplayedInContentArea msdn.microsoft.com/.../menuitem.isdisplayedincontentarea.aspx Or get the menuitem object from menufunction but do not know how.

  • Mohamed Asarafali Profile Picture
    445 on at

    If i understood correctly you want to have the active navigation. whenever you open a list page it should show the full navigation of the particular list page. I think it relates to showparentmodule property on the menu.

  • Community Member Profile Picture
    on at

    I found it. The Form, Menuitem Action, Menuitem Display, and Class I use must have same name.

    May be I should write small blog post about this.

  • Verified answer
    Martin Dráb Profile Picture
    239,035 Most Valuable Professional on at

    Your conclusion is wrong, as far as I can say. I can show you a counterexample, where every single name is unique.

    But I managed to reproduce the problem and the explanation is simple. It happens if the menu item doesn't exist anywhere in the menu or it's not set up to be used in the content area. How could AX show the menu path if none exists?

  • Community Member Profile Picture
    on at

    I also see this behavior when the callers args are used instead of creating new Args() like:

    public static void main (Args _args) {

    MenuFunction openProjects = new MenuFunction('ListPageName',MenuItemType::Display);

    _args.param('Something');

    openProjects.run(_args);

       }

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
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans