This document describes the PX1032 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1032 | DAC properties cannot contain method invocations. | Error | Unavailable |
DACs cannot contain method invocations. DACs are the classes that are used to read and write data. Therefore, for appropriate program architecture and design, DACs cannot contain any application logic.
To fix the issue, you should remove method invocations from the DAC.
The diagnostic ignores invocations of the following methods:
-
Static methods inside DAC fields (that is, property getters and setters)
-
Methods declared on the following system types:
bool
byte
short
int
long
decimal
float
double
string
Guid
DateTime
TimeSpan
Enum
Nullable
[Serializable]
public class POALCLandedCost : PXBqlTable, IBqlTable
{
public abstract class hold : IBqlField { }
protected bool? _Hold;
[PXDBBool()]
[PXUIField(DisplayName = "Hold", Visibility = PXUIVisibility.Visible)]
[PXDefault(true)]
public virtual bool? Hold
{
get
{
return this._Hold;
}
set
{
this._Hold = value;
this.SetStatus(); // The PX1032 error is displayed for this line.
}
}
protected virtual void SetStatus()
{
}
}