This document describes the PX1057 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1057 | A PXGraph instance cannot be initialized while another PXGraph instance is being initialized. |
Error | Unavailable |
A PXGraph
instance cannot be initialized while another PXGraph
instance is being initialized (that is, in constructors of another PXGraph
instance or in the Initialize
method overridden in an extension of another PXGraph
instance).
To fix the issue, you should remove the initialization of the PXGraph
instance from the PXGraph
constructor or the Initialize
method overridden in a graph extension and rework the related business logic.
This diagnostic is displayed as a warning if the Enable additional diagnostics for ISV Solution Certification option (in Tools > Options > Acuminator > Code Analysis) is set to False
.
public class DocCustomerExtensionMaint : PXGraph<DocCustomerExtensionMaint>
{
public DocCustomerExtensionMaint()
{
DocConnMaint maint = PXGraph.CreateInstance<DocConnMaint>(); // The PX1057 error is displayed for this line.
}
}