public UsageMaint() { if (!PXAccess.FeatureInstalled <FeaturesSet.projectModule>()) { AutoNumberAttribute.SetNumberingId <PMRegister.refNbr>(Document.Cache, arsetup.Current.UsageNumberingID); } Document.Cache.Insert(); }
protected void Vendor_RowPersisting(PXCache cache, PXRowPersistingEventArgs e) { var row = (Vendor)e.Row; string vClass = row.VendorClassID; if (vClass == "FORWARDER") { AutoNumberAttribute.SetNumberingId <Vendor.acctCD>(cache, "FORWARDER"); } }
public UsageMaint() { PXImportAttribute importAttribute = UnBilled.GetAttribute <PXImportAttribute>(); importAttribute.MappingPropertiesInit += ImportAttributeMappingPropertiesHandler; if (!PXAccess.FeatureInstalled <FeaturesSet.projectModule>()) { AutoNumberAttribute.SetNumberingId <PMRegister.refNbr>(Document.Cache, arsetup.Current.UsageNumberingID); } EnsurePMDocumentCreated(); }
private void SetNumbering(PXCache sender, Batch row) { if (row == null) { return; } if (Base.IsWithinContext) { Numbering numbering = PXSelectJoin <Numbering, InnerJoin <GLWorkBook, On <GLWorkBook.voucherNumberingID, Equal <Numbering.numberingID> > >, Where <GLWorkBook.workBookID, Equal <Required <GLWorkBook.workBookID> > > > .Select(this.Base, Base.GetContextValue <GLVoucherBatch.workBookID>()); AutoNumberAttribute.SetNumberingId <Batch.batchNbr>(sender, row.Module, numbering.NumberingID); if (numbering.UserNumbering == true) { sender.RaiseExceptionHandling <Batch.batchNbr>(row, row.BatchNbr, new PXException(GL.Messages.ManualNumberingDisabled)); } } }
protected virtual void ARCashSale_RowPersisting(PXCache sender, PXRowPersistingEventArgs e, PXRowPersisting bs) { if (bs != null) { bs(sender, e); } AR.Standalone.ARCashSale row = e.Row as AR.Standalone.ARCashSale; if (row == null) { return; } if (Base.IsWithinContext) { Numbering numbering = PXSelectJoin <Numbering, InnerJoin <GLWorkBook, On <GLWorkBook.voucherNumberingID, Equal <Numbering.numberingID> > >, Where <GLWorkBook.workBookID, Equal <Required <GLWorkBook.workBookID> > > > .Select(this.Base, Base.GetContextValue <GLVoucherBatch.workBookID>()); AutoNumberAttribute.SetNumberingId <AR.Standalone.ARCashSale.refNbr>(sender, row.DocType, numbering.NumberingID); if (numbering.UserNumbering == true) { sender.RaiseExceptionHandling <AR.Standalone.ARCashSale.refNbr>(row, row.RefNbr, new PXException(GL.Messages.ManualNumberingDisabled)); } } }
/* Override SetNumberingId<> by event */ public void _(Events.RowPersisting <AVLTable> eAVLTable) { AutoNumberAttribute.SetNumberingId <AVLTable.avlnbr>(eAVLTable.Cache, "AVL"); //AVL is the numbering sequence setting in system }