Question Status

Suggested Answer
Donn Lawrence Salvador asked a question on 24 Feb 2013 9:53 PM

I have a project that needs dynamic population of dialog field. lets say, i have a field that accepts number and a button. Upon Clicking of button, the dialog must generate fields based on what you have inputted on the field. example, i have inputted number 5 on the dialog field, when i clicked the dialogbutton, 5 more dialog field must be added to my dialog box, and these fields must be stored on either a list, a container, or any container.

Reply
Suggested Answer
José Antonio Estevan responded on 25 Feb 2013 6:32 AM

You can handle events on runtime as explained, for example, in this community blog post:

community.dynamics.com/.../handling-events-of-the-runbase-dialog-controls.aspx

But if I understand your question, the behaviour that you're expecting is quite dificult to handle with a dialog and I'll recommend you to develop an standard form. It will be more maintainable and you will have more control with a form object than doing all this logic with a dialog.

But if you absolutely need a dialog, you can play with the methods described in the above blog post .


Dynamics AX Developer · MVP · Blog · Twitter

Reply
Martin Dráb responded on 25 Feb 2013 3:44 AM

What exactly is your question?

You can add controls to dialog by calling Dialog.addField(). Also look at this article about runtime form controls.

Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog

Reply
Suggested Answer
José Antonio Estevan responded on 25 Feb 2013 6:32 AM

You can handle events on runtime as explained, for example, in this community blog post:

community.dynamics.com/.../handling-events-of-the-runbase-dialog-controls.aspx

But if I understand your question, the behaviour that you're expecting is quite dificult to handle with a dialog and I'll recommend you to develop an standard form. It will be more maintainable and you will have more control with a form object than doing all this logic with a dialog.

But if you absolutely need a dialog, you can play with the methods described in the above blog post .


Dynamics AX Developer · MVP · Blog · Twitter

Reply