Hi,
I need to know how to create menuitem button on form by x++ code in runtime.
Anyone shall share the code or idea.
Thanks in Advance.
Hi,
I need to know how to create menuitem button on form by x++ code in runtime.
Anyone shall share the code or idea.
Thanks in Advance.
Usually the best way is not doing it at all. For example, you can add it at design time and merely make it visible at runtime.
But if you really need that, you can do something like this:
FormBuildFunctionButtonControl menuItemButton = myGroup.addControl(FormControlType::MenuFunctionButton, 'MyButtonName'); menuItemButton.menuItemType(MenuItemType::Display); menuItemButton.menuItemName(menuItemDisplayStr(MyMenuItem));
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,409
Most Valuable Professional
nmaenpaa
101,156