This document describes the PX1014 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1014 | A DAC field must have a nullable type. | Error | Available |
A DAC property field must have a nullable type (such as decimal?
or DateTime?
). After the system has retrieved the values from the database and merged the records with PXCache
of the needed DAC type, particular fields of the DAC instance can contain null values. Therefore, for the system to work correctly, all DAC fields must be able to store null value.
The code fix changes the type of the DAC property field to the corresponding nullable type.
public class SOOrder : IBqlTable
{
public abstract class total : IBqlField { }
[PXDBDecimal]
public decimal Total { get; set; } // The PX1014 error is displayed for this line.
}
public class SOOrder : IBqlTable
{
public abstract class total : IBqlField { }
[PXDBDecimal]
public decimal? Total { get; set; }
}