Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Not able to pass record in menu item button

(0) ShareShare
ReportReport
Posted on by 1,479
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 .
 
  • Verified answer
    Layan Jwei Profile Picture
    Layan Jwei 7,679 Super User 2025 Season 1 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
  • Dineshkarlekar Profile Picture
    Dineshkarlekar 1,479 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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans