This document describes the PX1090 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1090 | PXSetupNotEnteredException cannot be thrown in action handlers. |
Warning (ISV Level 1: Significant) | Unavailable |
PXSetupNotEnteredException
, which is used to prevent the opening of a form, cannot be thrown in action handlers.
PXSetupNotEnteredException
can be thrown as follows:
- During
PXGraph
initialization - In data view delegates
- In the
RowSelected
event handlers
To prevent the warning from occurring, you should remove the code that throws PXSetupNotEnteredException
from the code of the action handler and rework the related business logic.
public PXAction<Supplier> Action1;
[PXButton]
[PXUIField(DisplayName = "Action 1")]
public void action1()
{
throw new PXSetupNotEnteredException<Supplier>(null); // The PX1090 warning is displayed for this line.
}