Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.57 KB

PX1074.md

File metadata and controls

40 lines (28 loc) · 1.57 KB

PX1074

This document describes the PX1074 diagnostic.

Summary

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

Diagnostic Description

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.

Example of Code that Results in the Warning

protected virtual void ARInvoice_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
{
    throw new PXSetupNotEnteredException(); // The PX1074 warning is displayed for this line.
}

Example of Possible Code Fix

protected virtual void ARInvoice_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
{
    throw new PXSetupNotEnteredException(); 
}

Related Articles

PXSetupNotEnteredException