public GLConsolSetupMaint() { GLSetup setup = glsetup.Current; ConsolSetupRecords.SetProcessCaption(Messages.ProcSynchronize); ConsolSetupRecords.SetProcessAllCaption(Messages.ProcSynchronizeAll); ConsolSetupRecords.SetProcessDelegate <GLConsolSetupMaint>(Synchronize); PXUIFieldAttribute.SetEnabled(ConsolSetupRecords.Cache, null, true); PXUIFieldAttribute.SetEnabled <GLConsolSetup.lastPostPeriod>(ConsolSetupRecords.Cache, null, false); PXUIFieldAttribute.SetEnabled <GLConsolSetup.lastConsDate>(ConsolSetupRecords.Cache, null, false); ConsolSetupRecords.SetAutoPersist(true); ConsolSetupRecords.Cache.AllowDelete = true; ConsolSetupRecords.Cache.AllowInsert = true; PXUIFieldAttribute.SetRequired <GLConsolSetup.segmentValue>(ConsolSetupRecords.Cache, true); PXUIFieldAttribute.SetRequired <GLConsolSetup.sourceLedgerCD>(ConsolSetupRecords.Cache, true); Save.StateSelectingEvents += new PXFieldSelecting(delegate(PXCache sender, PXFieldSelectingEventArgs e) { e.ReturnState = PXButtonState.CreateInstance(e.ReturnState, null, null, null, null, null, false, PXConfirmationType.Unspecified, null, null, null, null, null, null, null, null, null, null, null, null); ((PXButtonState)e.ReturnState).Enabled = !PXLongOperation.Exists(this.UID); }); }