Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

How to know opened/caller form MenuItem name?

(0) ShareShare
ReportReport
Posted on by 2,544

D365 How to know opened/caller form MenuItem name?

*This post is locked for comments

  • Samy123 Profile Picture
    455 on at
    RE: How to know opened/caller form MenuItem name?

    Thanks, will check. 

  • Marko Arsovski Cap Profile Picture
    on at
    RE: D365 How to know opened/caller form MenuItem name?

    if (element.args().menuItemName() == menuitemdisplaystr(YourFormMenuItem))
    {

    Write your logic....

    }

  • Verified answer
    Piyush Adhikari Profile Picture
    2,544 on at
    RE: D365 How to know opened/caller form MenuItem name?

    Ok got

    FormRun formRun = sender.formRun();

           ;

           info(formRun.args().menuItemName());

  • Piyush Adhikari Profile Picture
    2,544 on at
    RE: D365 How to know opened/caller form MenuItem name?

    How ?

    class AcxInventTransferOrdersEvents

    {

           /// <summary>

       ///

       /// </summary>

       /// <param name="sender"></param>

       /// <param name="e"></param>

       [FormDataSourceEventHandler(formDataSourceStr(InventTransferOrders, InventTransferTable), FormDataSourceEventType::QueryExecuting)]

       public static void InventTransferTable_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)

       {

           AcxUserSetup    userSetup = AcxUserSetup::find(curUserId());

           ;

           sender.

           sender.query().dataSourceTable(tableNum(InventTransferTable)).clearRanges();

           if (userSetup.InventSiteId)

               sender.query().dataSourceTable(tableNum(InventTransferTable)).addRange(fieldNum(InventTransferTable, AcxInventSiteidFrom)).value(userSetup.inventSiteId);

       }

    }

  • Suggested answer
    Sukrut Parab Profile Picture
    71,687 Moderator on at
    RE: D365 How to know opened/caller form MenuItem name?

    You can get it from 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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 50

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Featured topics

Product updates

Dynamics 365 release plans