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 .
 
  • 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,355 Super User 2026 Season 2 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

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 582 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
CU-1234529-002 Profile Picture

CU-1234529-002 185

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans