This document describes the PX1026 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1026 | Underscores cannot be used in the names of DACs and DAC fields. | Error | Available |
Underscores cannot be used in the names of DACs and DAC fields (that is, public
and internal
DAC properties and corresponding nested classes) because the underscore character is a special symbol for ASPX. If an underscore is used in the name of a DAC or a DAC field, a reference to the DAC property field in ASPX is interpreted incorrectly.
The code fix removes underscores from the selected name of the DAC, DAC property, or DAC nested class.
The diagnostic ignores the DAC nested classes for which the DAC does not contain a DAC property with the same name as the nested class but with the first letter in uppercase.
public class SO_Invoice : PXBqlTable, IBqlTable // The PX1026 error is displayed for this line.
{
#region InvoiceType
public abstract class invoiceType : IBqlField { }
[PXDBString(IsKey = true, InputMask = "")]
[PXDefault]
[PXUIField(DisplayName = "Invoice Type")]
public string Invoice_Type { get; set; } // Another PX1026 error is displayed for this line.
#endregion
}
public class SOInvoice : PXBqlTable, IBqlTable
{
#region InvoiceType
public abstract class invoiceType : IBqlField { }
[PXDBString(IsKey = true, InputMask = "")]
[PXDefault]
[PXUIField(DisplayName = "Invoice Type")]
public string InvoiceType { get; set; }
#endregion
}