class EZProjInvoiceProposalDetailFormEventHandler
{
    [FormEventHandler(formStr(ProjInvoiceProposalDetail), FormEventType::Initialized)]
    public static void ProjInvoiceProposalDetail_OnInitialized(xFormRun _sender, FormEventArgs _e)
    {
        FormStringControl lineOfBusinessIdControl = _sender.design().controlName(formControlStr(ProjInvoiceProposalDetail, EZLineOfBusinessId));
        
        lineOfBusinessIdControl.registerOverrideMethod(
            methodStr(FormStringControl, jumpRef), 
            methodStr(EZProjInvoiceProposalDetailFormEventHandler, lineOfBusinessJumpRef),
            new EZProjInvoiceProposalDetailFormEventHandler());
    }

    public void lineOfBusinessJumpRef(FormStringControl _control)
    {
        LineOfBusiness lineOfBusiness = LineOfBusiness::find(_control.valueStr());

        Args args = new Args();
        args.caller(_control.formRun());
        args.record(lineOfBusiness);
        args.lookupRecord(lineOfBusiness);

        new MenuFunction(menuItemDisplayStr(LineOfBusiness), MenuItemType::Display).run(args);
    }

}