Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.7 KB

PX1006.md

File metadata and controls

33 lines (23 loc) · 1.7 KB

PX1006

This document describes the PX1006 diagnostic.

Summary

Code Short Description Type Code Fix
PX1006 The order of view declarations will cause the creation of one cache instance for multiple DACs Message Unavailable

Diagnostic Description

For inherited DAC types, the order of data view declarations affects the number of PXCache instances for these DACs as follows:

  • Two PXCache instances are created if you declare the data views so that the first data view uses the base DAC, and the second data view uses the derived type.
  • A shared PXCache instance for the base DAC and the derived DAC is created if you declare the data views so that the first data view uses the derived DAC, and the second data view uses the base DAC.

The diagnostic supports graphs and graph extensions. The diagnostic works with the code based on Acumatica Framework 2018 R1 or earlier.

To use separate PXCache instances, you change the order of data view declarations. If you are using a shared PXCache instance, make sure the PXCache instance refers to the needed DAC type.

Example of Code that Results in the Message

public class BAccount : PXBqlTable, IBqlTable { }
public class Vendor : BAccount { }
  
public class VendorMaint : PXGraph<VendorMaint, Vendor> // The PX1006 warning is displayed for this line.
{
    public PXSelect<Vendor> Vendor;
    public PXSelect<BAccount> VendorBAcc;
  
    // One PXCache<Vendor> instance is used for both Vendor and BAccount
}