axapta - Enable/Disable FINISH button of wizard based on user input -
i have created wizard in ax 2012 using wizard wizard... need put 1 functionality i.e., enable or disable finish button based on user input.
i have tried these 3 ways without success..
this.finishenabled() -- on setupnavigation method of wizard class
finishenabled[formrun.tabidx()] = false -- on setupnavigation method of wizard class
syswizard.finishenable(false, curtabidx(),false) - on tabpage of wizard form
please reply if have solution this....
the wizard class has validate method in following:
boolean validate() { if(sometestcondition) { return true; } return false; }
according microsoft, method following:
used validate user input, , called before wizard closed. returns false if user input invalid. prevent run method being called when user clicks finish button. wizard class on msdn
additionally, can use textchanged() method on field want validate (or if not text, can use changed method of object).
if (this.text()) { if (!syswizard.isnextenabled()) { syswizard.nextenabled(true, syswizard.curtab(), false); } } else { if (syswizard.isnextenabled()) syswizard.nextenabled(false, syswizard.curtab(), false); }
also msdn enable buttons
Comments
Post a Comment