Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.52 KB

PX1057.md

File metadata and controls

31 lines (22 loc) · 1.52 KB

PX1057

This document describes the PX1057 diagnostic.

Summary

Code Short Description Type Code Fix
PX1057 A PXGraph instance cannot be initialized while another PXGraph instance is being initialized. Error Unavailable

Diagnostic Description

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.

Example of Incorrect Code

public class DocCustomerExtensionMaint : PXGraph<DocCustomerExtensionMaint>
{
    public DocCustomerExtensionMaint()
    {
        DocConnMaint maint = PXGraph.CreateInstance<DocConnMaint>(); // The PX1057 error is displayed for this line.
    }
}

Related Articles

PXGraph