As far as I can tell, I have set this auto numbering field up correctly. I've done multiple auto numbering setups in the past, but this one does not seem to want to work, and I cannot see why.
This is the DAC object to store the auto numbering:
[PXDBString(15, IsUnicode = true, InputMask = "")]
[PXSelector(typeof(Numbering.numberingID), DescriptionField = typeof(Numbering.descr))]
[PXUIField(DisplayName = "Catalog Header Nbr")]
public virtual string CatalogHeaderNbr { get; set; }
public abstract class catalogHeaderNbr : IBqlField { }
This is assigning it to the CD field:
[PXDBString(15, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC", IsKey = true)]
[AutoNumber(typeof(CFBSNumberingSetup.catalogHeaderNbr), typeof(AccessInfo.businessDate))]
[PXUIField(DisplayName = "Catalog ID")]
[PXDefault]
[PXSelector(typeof(Search<CFBSCatalogHeader.catalogCD>),
new Type[]
{
typeof(CFBSCatalogHeader.catalogCD),
typeof(CFBSCatalogHeader.vendorID),
typeof(CFBSCatalogHeader.descr)
},
DescriptionField = typeof(CFBSCatalogHeader.catalogCD)
)]
public virtual string CatalogCD { get; set; }
public abstract class catalogCD : IBqlField { }
Numbering Sequence screen (Please note the symbol I have is NEW):
Numbering Setup page I made that has the assigned stored value:
Error I get when I save (Note the symbol says SELECT instead of NEW):
Error Trace:
11/7/2018 10:19:34 AM Error: Value cannot be null. Parameter name: format
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(String format, Object[] args) at PX.Data.PXMessages.LocalizeFormat(String strMessage, String& MessagePrefix, Object[] args) at PX.Data.PXException..ctor(String format, Object[] args) at PX.Objects.CS.AutoNumberAttribute.RowPersisting(PXCache sender, PXRowPersistingEventArgs e) in F:\Bld\AC-FULL2018R112-JOB1\sources\WebSites\Pure\PX.Objects\CS\Descriptor\Attribute.cs:line 2808 at PX.Data.PXCache.OnRowPersisting(Object item, PXDBOperation operation) at PX.Data.PXCache`1.PersistInserted(Object row) at PX.Data.PXCache`1.Persist(PXDBOperation operation) at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation) at PX.Data.PXGraph.Persist() at PX.Data.PXSave`1.d__2.MoveNext() at PX.Data.PXAction`1.d__31.MoveNext() at PX.Data.PXAction`1.d__31.MoveNext() at PX.Web.UI.PXBaseDataSource.tryExecutePendingCommand(String viewName, String[] sortcolumns, Boolean[] descendings, Object[] searches, Object[] parameters, PXFilterRow[] filters, DataSourceSelectArguments arguments, Boolean& closeWindowRequired, Int32& adapterStartRow, Int32& adapterTotalRows) at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)