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, ...
Answered

Not able to pass record in menu item button

(0) ShareShare
ReportReport
Posted on by 1,836
I was trying to call another form using the button on my form using the clicked method of the menu item button but getting error can anybody help me on this .
 
I have the same question (0)
  • Dineshkarlekar Profile Picture
    1,836 on at
    [Control("MenuFunctionButton")]
        class InventOnHandItem
        {
            /// <summary>
            ///
            /// </summary>
            public void clicked()
            {
                Args                 args = new Args();
             
                str                  menuItemDisplay = MenuItemDisplayStr(InventOnhandItem);
                MenuFunction         MenuFunction    = new MenuFunction(menuItemDisplay, MenuItemType::Display);
                Query                q = new Query();
                QueryBuildDataSource qbds;
                qbds     = q.addDataSource(tableNum(InventDim));
                qbds.addRange(fieldNum(InventDim,LicensePlateId);
                MenuFunction.run(args);     
                //super();
            }
        }
    here is my code , i am not getting what i am doing wrong
  • Verified answer
    Layan Jwei Profile Picture
    8,165 Super User 2026 Season 1 on at
    Hi Dineshkarlekar,
     
    I think it's because u didn't pass inventDim to the args
     
    So maybe try to get the value of inventDim table buffer then
    If(inventDim)
    {
       args.record(inventDim);
       //Call run function 
    }


    Also i can see that you've added code for query but you didn't use it. So can you please explain what you are trying to do exactly so that we can help
     
    Best Regards,
    Layan Jwei

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans