Disabling buttons in JournalVoucher

Hi All,

I need to disable all the (child)buttons under a menu button(parent).

I need to use this in AccountsPayable->journals->paymentJournal->lines->JournalVoucher, here I want to disable all the child buttons of paymentStatus menu button, Later I’ll enable the buttons what I require.

Is there any way, instead of hard coding for all the buttons as button_name.enable(false), In future I may add some more statuses under paymentStatus, so I need to disable all the child buttons without hard coding.

You can loop through the button group and disable all controld in that group using the below code.

FormButtonGroupControl group1;

FormControl fc;

int counter;

super();

group1 = element.design().controlName(“ButtonGroup”);

for(counter =0;counter< group1.controlCount();counter++)

{

fc = group1.controlNum(counter+1);

if(fc)

fc.enabled(False);

}