This document describes the PX1039 diagnostic.
| Code | Short Description | Type | Code Fix |
|---|---|---|---|
| PX1039 | The use of the PX namespace and its sub-namespaces is prohibited. These namespaces are reserved for use by Acumatica. |
Warning | Unavailable |
The PX namespace and all its sub-namespaces (such as PX.Data, PX.Objects, PX.Common) are reserved exclusively for use by the Acumatica Framework. Independent Software Vendors (ISVs) and partners
must not declare custom namespaces that start with PX or create types within these reserved namespaces. Using the reserved PX namespace hierarchy can lead to naming conflicts with the current or future
Acumatica Framework types.
The PX1039 diagnostic validates namespace declarations and reports a warning if any of the following conditions are met:
- The namespace is exactly
PX(case-insensitive). - The namespace starts with
PX.(case-insensitive), such asPX.CustomModuleorPX.Extensions.
The PX1039 diagnostic is designed to be used by ISVs, OEMs, partners, and other external developers. It is active only when the ISV Mode is enabled in Acuminator settings in Visual Studio options
(Tools > Options > Acuminator > General > Enable additional diagnostics for ISV Solution Certification).
using System;
using PX.Data;
namespace PX // Error: Direct use of the reserved PX namespace
{
public class CustomOrderEntry : PXGraph<CustomOrderEntry>
{
// Custom implementation
}
namespace CustomModule // Error: Nested namespace is still within the reserved PX namespace
{
public class CustomEntry : PXGraph<CustomEntry>
{
// Custom implementation
}
}
}
namespace PX.SomeOtherNamespace // Error: Use of PX as a prefix for a sub-namespace
{
public class SomeOrderEntry : PXGraph<SomeOrderEntry>
{
// Custom implementation
}
}using System;
using PX.Data;
namespace PX.SomeModule; // Error: File-scoped namespace using the reserved PX namespace
public class CustomOrderEntry : PXGraph<CustomOrderEntry>
{
// Custom implementation
}