Hi TeKnAs,
Have you tried with returning value as true/false from script block to invoke command button action.
If returning true/false from script block is not working,then you can add one hidden async command to call the action(that was being called from command button) and that hidden button can be invoked from script block.
Sample code for calling hidden async command block can be
var prevRowState=CAF.model('#{activePageBean.clientIds["htmlInputText"]}');
if(prevRowState=='1')
{
var cmdModel = CAF.model('#{activePageBean.clientIds["hidden12"]}');
cmdModel.raise();
}
else
{
alert("okk")
//Do nothing
}
Please let us know if you are facing any problem in implementing the same.
Thanks
Baharul Islam
#webMethods-BPMS#MWS-CAF-Task-Engine#webMethods