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.
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".
Thanks Martin for the reply
Actually I just want to add a simple button on a form using "FormBuildButtonControl" in Ax 2012
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 for the reply
Let me check this first.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 1,933
André Arnaud de Cal... 793 Super User 2025 Season 2
Sohaib Cheema 537 User Group Leader