Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.44 KB

File metadata and controls

44 lines (31 loc) · 1.44 KB

PX1028

This document describes the PX1028 diagnostic.

Summary

Code Short Description Type Code Fix
PX1028 Constructors in DACs and DAC extensions are prohibited. Error Available

Diagnostic Description

The PX1028 diagnostic reports constructors defined in DACs and DAC extensions.

Constructors in DACs and DAC extensions are prohibited for the following reasons:

  • DACs and DAC extensions are the classes that are used to read and write data. Therefore, for appropriate program architecture and design, DACs and DAC extensions cannot contain any business logic.
  • Acumatica Framework creates DAC and DAC extension instances by using the default constructor without parameters.

Code Fix Description

The code fix for the PX1028 diagnostic removes the selected constructor from the DAC or DAC extension.

Example of Incorrect Code

public class POLine : PXBqlTable, IBqlTable
{
	public POLine() : base() // The PX1028 error is displayed for this line.
	{
	}
}

Example of Code Fix

public class POLine : PXBqlTable, IBqlTable
{
}

Related Articles