Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 880 Bytes

PX1001.md

File metadata and controls

25 lines (17 loc) · 880 Bytes

PX1001

This document describes the PX1001 diagnostic.

Summary

Code Short Description Type Code Fix
PX1001 A PXGraph instance must be created with the PXGraph.CreateInstance() factory method. Error Available

Diagnostic Description

The PXGraph.CreateInstance<T>() method must be used to instantiate graph types from code. You cannot use the graph constructor new T().

The code fix replaces new T() with PXGraph.CreateInstance<T>().

Example of Incorrect Code

var graph = new SOOrderEntry(); // The PX1001 error is displayed for this line.

Example of Code Fix

var graph = PXGraph.CreateInstance<SOOrderEntry>();