web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    Not able to pass record in menu item button
    [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,060 Super User 2025 Season 2 on at
    Not able to pass record in menu item button
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 696 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 569

#3
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans