disable/enable the controls in Batch tab of dialog in Ax 2012

Hi,

When we are inheriting RunBaseBatch class and writing dialog methods we will get one tab called Batch.

There we can set the recurrence and all the batch details.

I want the batch tab but want to disable some controls like Alert button and private check box.

Is it possible to do that? If yes please help me to do that.

Thanks,

Maria

This part of the dialog is created in BatchInfo class, dialog() method. The class also contains references to dialog fields, e.g. fieldPrivate, which you can use to manipulate fields’ state.

Thanks Martin. Yes just I found it.

But I cannot comment in batchinfo, since it will reflect in all places. (where ever batch has called)

Is it any way there to visible false only to this occurrence of my class?

There are many ways and I can’t tell you which one is the best in your case. I would consider the following, for example:

  1. Create a child of BatchInfo class and either implement the logic there or expose properties that you’ll use from your batch to configure the behavior. The dialog() method will call super() and then disable controls and so on.
  2. Change RunBaseBatch.batchInfo() not to be final.
  3. Override batchInfo() in your batch to return the custom child of BatchInfo (configured as needed).