This document describes the PX1037 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1037 | An unbound DAC field cannot be used in a key declaration. | Error | Unavailable |
The diagnostic checks the fields that are used in a primary, foreign, or unique key declaration. The key declaration cannot contain unbound fields. The checking for unbound DAC keys in DAC applies to all DACs except abstract DACs.
To fix the issue, remove unbound fields from the key declaration and replace them with database-bound fields.
The diagnostic does not suggest a code fix.
[PXCacheName("Sales Order Line")]
public partial class SOLine : PX.Data.PXBqlTable, PX.Data.IBqlTable
{
public static class MyFK
{
public class SOOrder : PX.Objects.SO.SOOrder.PK.ForeignKeyOf<SOLine>.By<unboundField, orderNbr> { }
}
[PXInt]
public virtual int? UnboundField { get; set; }
public abstract class unboundField : PX.Data.IBqlField { }
public abstract class orderNbr : PX.Data.IBqlField { }
}
[Data Access Classes] (https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=3f6ee8e9-b29e-4dab-b4f8-4406c3ef101d)
[Bound Field Data Types] (https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=61059393-8873-451f-b474-783906330fc6)
[Unbound Field Data Types] (https://help.acumatica.com/Help?ScreenId=ShowWiki&pageid=61059393-8873-451f-b474-783906330fc6)