This document describes the PX1054 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1054 | A PXGraph instance cannot start a long-running operation during the PXGraph initialization. |
Error | Unavailable |
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.
public class SMUserProcess : PXGraph
{
public SMUserProcess()
{
SyncUsers(); // The PX1054 error is displayed for this line.
}
private void SyncUsers()
{
PXLongOperation.StartOperation(this, () => Console.WriteLine("Synced"));
}
}