Disable button in dialog form

Hi,

I have a dialog form which is call from different different classes

this dialog form has three button like( Ok,Cancel , Fileformat)

my question is that when i call this form through my class then its ‘Fileformat’ button should be disable

and enable for all other classes which is call to this dialog form

i am sharing screen shot also

Ax Version AX2012R3

pls help me its urgent

thanks in advance.

How have you built your dialog? From code? Maybe using a UI builder class? Or is it a modeled form?
With which part of your requirement do you need a help? Maybe you don’t know what you can use enabled() method enable and disable controls. Or maybe you don’t know how to get a reference to your new button. Or something else?

where do you call that form ,whether from your customized class or from any other source?

Please elaborate the issue!!

This is the standard dialog form
and i am calling from my customized class

Actually i am calling this dialog form through my customized class
there are so many class which is called this dialog form so i just want to show only one extra button only for
particular class and remain same as it is for all other class

How you are calling this dialog in your class? If possible show us the code.

There is a simply code in my class
there is mehtod of dialog in that class which is something like that

Dialog dialog
dialog = super()
in dialog it calling super()

Is it calling a dialog form or have you created dialog from code & added a new button from code? This seems like partial code only.

there is a method of name dialog in class and call to super()

Is your class extending any other class? Then code might be in the dialog method of that class. Some code should be there in the system which is generating this dialog that you see.

hi,
this is the standard form you can also see go to AR->Periodic->update->updatefinancial

actually this class extend to RunBaseBatch

thanks for quick reply

Dialog method in smmUpdateFinancial class has the code from which dialog is generated.

If multiple classes are calling this class, then you can setup a parameter method in this class to know from where it is called or simply use the caller function if you can.

Refer the following link, which describes how you can enable/disable a button on custom dialogs:

https://community.dynamics.com/ax/b/axaptavsme/archive/2013/05/03/how-to-enable-disable-fields-in-a-dialog

I Try this link

thanks for your quick response
once again thanks

Hi Taukeer,

U can disable the button by using caller(class)…

You have to check the caller of that dialog form if it is your customised class then disable the Fileformat field, else it will be enabled.

Can you please show us the code so that we can able to provide an possible solution?