Hi Experts

I have a RunBase class with two fields as following:

I want to disable one field i.e Customer id when we select value in customer account field.

For this i have added this code:

class TestDialog extends RunBase
{    
    DialogField             fieldCustomerAccount;
    DialogField             custId;
    CustTable               custTable;
    CustAccount             account;  

 
    public Object Dialog()
    {
        Dialog  dialog;
        FormBuildStringControl          formStrCtrls;

        dialog = super();       
        dialog.caption("Test");        
        fieldCustomerAccount = dialog.addField(extendedTypeStr(CustAccount), "Customer account" );
        custId = dialog.addField(extendedTypeStr(String10), "Customer id" );        
        formStrCtrls             = custId.control();        
        formStrCtrls.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(TestDialog, modified), this);

        return dialog;
    }

    public boolean getFromDialog()    {
        
        account  = fieldCustomerAccount.value();
        return super();
    }

    protected boolean canRunInNewSession()
    {
        return true;
    }

    static TestDialog construct()
    {
        return new TestDialog();
    }

    public static void main(Args _args)
    {
        TestDialog testDialog = TestDialog::construct();
       
       
        if (testDialog.prompt())
        {
            testDialog.run();
           
        }
    }

    public void modified(FormStringControl _control)
    {
        if(fieldCustomerAccount.value())
        {
        
            custId.enabled(false);
        }
    
    }

}

But it did not work.

Please suggest how to disable dialogbox.

Thanks

Sona Jee