Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.47 KB

PX1054.md

File metadata and controls

35 lines (26 loc) · 1.47 KB

PX1054

This document describes the PX1054 diagnostic.

Summary

Code Short Description Type Code Fix
PX1054 A PXGraph instance cannot start a long-running operation during the PXGraph initialization. Error Unavailable

Diagnostic Description

A PXGraph instance cannot start a long-running operation during the PXGraph initialization (that is, in PXGraph constructors, in the Initialize method overridden in PXGraphExtension, or handlers subscribed at run time through the static InstanceCreated member of PXGraph).

To fix the issue, you remove from the PXGraph initialization the invocation of a long-running operation and rework the related business logic.

Example of Incorrect Code

public class SMUserProcess : PXGraph
{
    public SMUserProcess()
    {
        SyncUsers(); // The PX1054 error is displayed for this line.
    }

    private void SyncUsers()
    {
        PXLongOperation.StartOperation(this, () => Console.WriteLine("Synced")); 
    }
}

Related Articles