Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 2.15 KB

PX1068.md

File metadata and controls

64 lines (48 loc) · 2.15 KB

PX1068

This document describes the PX1068 diagnostic.

Summary

Code Short Description Type Code Fix
PX1068 The type of the DAC field property does not correspond to the type of the BQL field. Error Available

Diagnostic Description

The DAC field property must have a type that is consistent with the type of the BQL field that corresponds to this property. For example, if a DAC field property has the int? type, then the type of the corresponding BQL field should be BqlInt.

The diagnostic has two available code fixes:

  • Change the property type so that it corresponds to the type attribute of the BQL field.
  • Change the type of the BQL field so that it corresponds to the property type.

Example of Incorrect Code

public class SOOrder : PXBqlTable, IBqlTable
{
	#region OrderType
	[PXUIField]
	public virtual byte[] OrderType { get; set; }

	public abstract class orderType : PX.Data.BQL.BqlString.Field<orderType> { }
	#endregion

    #region NoteID
	public abstract class noteID : PX.Data.BQL.BqlInt.Field<noteID> { }

	[PXGuid]
	public Guid? NoteID { get; set; }
	#endregion
}

Example of Code Fix

public class SOOrder : PXBqlTable, IBqlTable
{
	#region OrderType
	[PXUIField]
	public virtual string OrderType { get; set; }

	public abstract class orderType : PX.Data.BQL.BqlString.Field<orderType> { }
	#endregion

	#region NoteID
	public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }

	[PXGuid]
	public Guid? NoteID { get; set; }
	#endregion
}

Related Articles