This document describes the PX1095 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1095 | A field with the PXDBCalced or PXDBScalar attribute must have an unbound type attribute, such as PXDate or PXDecimal . |
Error | Unavailable |
A field with the PXDBCalced
or PXDBScalar
attribute must have an unbound type attribute, such as PXDate
or PXDecimal
.
Otherwise, the graph cache will not be able to create the PXFieldState
object which contains information about the state of the DAC field. The field state is used by many built-in features of Acumatica ERP. If the field state object does not exist, the field may be incorrectly displayed in the user interface and not supported by different features of Acumatica ERP.
To prevent the error from occurring, you should specify an unbound type attribute for the field.
#region LastActivityDate
public abstract class lastActivityDate : IBqlField { }
[PXDBCalced(typeof(Switch<
Case<Where<lastIncomingActivityDate, IsNotNull, And<lastOutgoingActivityDate, IsNull>>, lastIncomingActivityDate,
Case<Where<lastOutgoingActivityDate, IsNotNull, And<lastIncomingActivityDate, IsNull>>, lastOutgoingActivityDate,
Case<Where<lastIncomingActivityDate, Greater<lastOutgoingActivityDate>>, lastIncomingActivityDate>>>,
lastOutgoingActivityDate>),
typeof(DateTime))]
[PXUIField(DisplayName = "Last Activity Date", Enabled = false)]
public virtual DateTime? LastActivityDate { get; set; } // The PX1095 error is displayed for this line.
#endregion
#region LastActivityDate
public abstract class lastActivityDate : IBqlField { }
[PXDBCalced(typeof(Switch<
Case<Where<lastIncomingActivityDate, IsNotNull, And<lastOutgoingActivityDate, IsNull>>, lastIncomingActivityDate,
Case<Where<lastOutgoingActivityDate, IsNotNull, And<lastIncomingActivityDate, IsNull>>, lastOutgoingActivityDate,
Case<Where<lastIncomingActivityDate, Greater<lastOutgoingActivityDate>>, lastIncomingActivityDate>>>,
lastOutgoingActivityDate>),
typeof(DateTime))]
[PXDateAndTime]
[PXUIField(DisplayName = "Last Activity Date", Enabled = false)]
public virtual DateTime? LastActivityDate { get; set; }
#endregion
PXDBCalcedAttribute PXDBScalarAttribute Ad Hoc SQL for Fields