Announcements
Dear All,
I am actually trying to create a Button on a form any kind of button either "Edit" or "New" using class in Ax 2012 through X++ code.
I am new to this...
Kindly please help me in this regard.
Thanks in advance.
Thanks for the reply
Let me check this first.
Hi Morij,
Please check this if it's helpful: cloudblogs.microsoft.com/.../
Dialog dlg = new Dialog(); DialogGroup dlgGroup; FormBuildGroupControl buttonGroup; FormBuildButtonControl buttonControl; dlgGroup = dlg.addGroup('ButtonGroup'); buttonGroup = dlg.formBuildDesign().control(dlgGroup.formBuildGroup().id()); buttonControl = buttonGroup.addControl(FormControlType::Button, 'A Button'); buttonControl.registerOverrideMethod(methodStr(FormButtonControl, clicked), methodStr(YourClass, yourClickedMethod), this);
Thanks Martin for the reply
Actually I just want to add a simple button on a form using "FormBuildButtonControl" in Ax 2012
Can you tell us more about the requirement, to allow us to provide a suitable solution?
Wouldn't it be much easier to add the button to the form at design time and control its visibility by security or code?
By the way, let me change the category of this thread, because it's cleatly about development and not "Other".
André Arnaud de Cal...
293,302
Super User 2025 Season 1
Martin Dráb
232,114
Most Valuable Professional
nmaenpaa
101,156
Moderator