A dialog in Microsoft Dynamics AX is a simple form with a standardized layout, created by using the Dialog system class. It’s a way to present users with a simple input form, they are commonly used for small tasks, it should NOT be used to create complex forms. It should not open a secondary window that requires user interaction. All user interaction should be carried out within the dialog.
1. Open the AOT, and create a new class with the following code, its important ro extend RunBase because the RunBase framework uses the Dialog framework to prompt a user for data input. It uses the SysLastValue framework to persist usage data and the Operation Progress framework to show operation progress:
2. Override the method Dialog, this method will be used to give “form” to our Dialog:
3. Override the method getFromDialog, the code below will be used to retrieve the Dialog field values:
4. Override the method run, use it to process whatever you want to. On my example I will use it to show the customer account information on infolog.
5. Create a new main method to execute your class.
6. Execute your class, check results.