This document describes the PX1092 diagnostic.
Code | Short Description | Type | Code Fix |
---|---|---|---|
PX1092 | Action handlers must be decorated with the PXUIField attribute and with the PXButton attribute or its successors. |
Error | Available |
A declaration of a method that implements an action in a graph must be preceded with the PXUIField
attribute and the PXButton
attribute or one of its successors.
The code fix adds the missing attribute or attributes to the action handler.
[PXUIField(DisplayName = "View Document",
MapEnableRights = PXCacheRights.Select,
MapViewRights = PXCacheRights.Select)]
public virtual IEnumerable viewDocument(PXAdapter adapter) // The PX1092 error is displayed for this line.
{
//Implementation of the method
}
[PXUIField(DisplayName = "View Document",
MapEnableRights = PXCacheRights.Select,
MapViewRights = PXCacheRights.Select)]
[PXButton]
public virtual IEnumerable viewDocument(PXAdapter adapter)
{
//Implementation of the method
}