Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.45 KB

PX1019.md

File metadata and controls

33 lines (24 loc) · 1.45 KB

PX1019

This document describes the PX1019 diagnostic.

Summary

Code Short Description Type Code Fix
PX1019 A DAC property field with the AutoNumber attribute must have the string type. Error Available

Diagnostic Description

You can use the AutoNumber attribute on a DAC field to enable auto-numbering for the field. The AutoNumber attribute expects a field of a string type. Fields of other types are not supported.

To fix the issue, you can do one of the following:

  • Change the field type to string.
  • Use the AutoNumber attribute on a different field that has a string type.

The code fix replace the fields type with string.

Example of Incorrect Code

[AutoNumber(typeof(RSSVSetup.numberingID), typeof(RSSVWorkOrder.dateCreated))]
public virtual int OrderNbr { get; set; } // The PX1019 error is displayed for this line.
public abstract class orderNbr : PX.Data.BQL.BqlInt.Field<orderNbr> { }

Example of Possible Code Fix

[AutoNumber(typeof(RSSVSetup.numberingID), typeof(RSSVWorkOrder.dateCreated))]
public virtual string OrderNbr { get; set; }
public abstract class orderNbr : PX.Data.BQL.BqlString.Field<orderNbr> { }