Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.02 KB

PX1027.md

File metadata and controls

52 lines (38 loc) · 2.02 KB

PX1027

This document describes the PX1027 diagnostic.

Summary

Code Short Description Type Code Fix
PX1027 The CompanyMask, CompanyID, and DeletedDatabaseRecord fields cannot be declared in DACs. Error Available

Diagnostic Description

The CompanyMask, CompanyID, and DeletedDatabaseRecord table columns are handled automatically by the system and the corresponding fields cannot be declared in DACs.

The code fix removes the unnecessary field from the DAC.

This diagnostic is displayed as a warning for the DeletedDatabaseRecord field if the Enable additional diagnostics for ISV Solution Certification option (in Tools > Options > Acuminator > Code Analysis) is set to False.

Example of Incorrect Code

public partial class POOrder : IBqlTable
{
    #region CompanyID
    public abstract class companyId : IBqlField { } // The first PX1027 error is displayed for this line.

    [PXDBString(IsKey = true, InputMask = "")]
    [PXDefault]
    [PXUIField(DisplayName = "Company ID")]
    public string CompanyID { get; set; } // The first PX1027 error is also displayed for this line.
    #endregion

    #region  DeletedDatabaseRecord
    public abstract class deletedDatabaseRecord { } // The second PX1027 error is displayed for this line.
    [PXDefault]
    [PXUIField(DisplayName = "Deleted Flag")]
    public string DeletedDatabaseRecord { get; set; } // The second PX1027 error is also displayed for this line.
    #endregion
}

Example of Code Fix

public partial class POOrder : IBqlTable
{

}

Related Articles