I have a RunBase class where I am using a dialog to select options for selecting specific records in a grid. I’ve added a “All Records” checkbox to the dialog. When this is selected, I want to disable the dropdown for bankTransType and have it select all records regardless of type…I have the code in place to do this as well, but…
I’ve added code to the dialog:
dialog.allowUpdateOnSelectCtrl(true);
And then I’ve created a method to enable/disable the field based on my checkbox selection:
public void dialogSelectCtrl()
{
NoYesId allrecs;
;
allrecs = dialogAllTransType.value();
if(allrecs == 1)
{
dialogBankTransType.value("");
dialogBankTransType.enabled(0);
}
else
{
dialogBankTransType.enabled(1);
}
}
This works, but it doesn’t enable/disable immediately as the check box is checked or unchecked, you have to check it and then tab to the next field or click on another field in the dialog form for the dialogBankTransType dropdown to update.
Any ideas on whether there is a way I can tell X++ to update these without having to tab to the next field, or have it tab automatically in the code?
Thanks!