Change Control Value of a dialog box at run time in Ax 2012

According to the requirement, I want to show the file path in the dialog box as shown below

2728.file1.PNG

This is a dialog box which gets open when we click on a menu. In this dialog box when we change the project id from the above dropdown box ,the path should automatically get changed with respect to the customer attached with that project id.

The issue I am facing is that it is a standard dialog box & the parameters shown here are coming directly from the SSRS report parameters defined in Visual studio.

So not getting any class on which I can write my code which changes the control value of the dialog box in Ax 2012 depending on changing the value of any other control.

Hi Abhishek,

First for that SSRS report what is the class you need to find out by using menuitems then in that class Class Declaration and ProcessReport method you can able to find where those parameters come from and it must be some contract class. In that class you can able to modify based on your requirement.

Regards,

Abbas

Hi abbs,

Thank you for the reply. Yes I am getting the parameters correctly from the contract clas.

Also I have made a controller class in which these parameters value can be changed at run time in prepromptmodifycontract method.

But my issue is that if i write my code in prepromptmodifycontract method , then the dialog box appears with new customized parameters but i have to select the values i.e project Id into the dialog box and want that the value for file path parameter or text box should automatically get changed when new project id is get selected.

I think you should implement your own UI builder (extending SrsReportDataContractUIBuilder) and associate it with the data contract via SysOperationContractProcessingAttribute.

Hi martin,

Can you please elaborate it . because I have stucked here and not getting any way to proceed.

How can i implement my own UI builder,I havnt done it before & how can i associate it with my dialog box controller class.

Can you please define it more.

Thanks in advance.

See the documentation and children of SrsReportDataContractUIBuilder such as VendRequestUIBuilder (they’re all listed on MSDN; you can also use Type hierarchy browser).

About SysOperationContractProcessingAttribute, just decorate the data contract class with it and pass UI builder name as parameter. Example:

[
    DataContractAttribute,
    SysOperationContractProcessingAttribute(classstr(VendRequestUIBuilder),
    SysOperationDataContractProcessingMode::CreateUIBuilderForRootContractOnly)
]
class VendRequestContract