General X++ Development
How do I add a button to an existing D365FO form?
How do I add a button to an existing D365FO form?
1 answer
Write an answerCreate a form extension and add the button through metadata.
The normal flow is:
- Create an extension of the form.
- Add the button to the correct Action Pane or button group.
- Use a menu item if the button launches another object.
- If it needs custom click logic, extend the control's
clicked()method or use the appropriate event.
If metadata can do the job, use metadata. There is no reason to dynamically create a button in X++ for a normal form customization.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer