This document describes the PX1074 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1074 | PXSetupNotEnteredException cannot be thrown in any event handlers except for the RowSelected event handlers. |
Warning (ISV Level 1: Significant) | Unavailable |
PXSetupNotEnteredException
, which is used to prevent the opening of a form, cannot be thrown in any event handlers except the RowSelected
event handlers.
PXSetupNotEnteredException
can also be thrown as follows:
- During
PXGraph
initialization - In data view delegates
To prevent the warning from occurring, you can move the code that throws PXSetupNotEnteredException
to a RowSelected
event handler.
protected virtual void ARInvoice_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
{
throw new PXSetupNotEnteredException(); // The PX1074 warning is displayed for this line.
}
protected virtual void ARInvoice_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
throw new PXSetupNotEnteredException();
}