Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.48 KB

PX1092.md

File metadata and controls

42 lines (32 loc) · 1.48 KB

PX1092

This document describes the PX1092 diagnostic.

Summary

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

Diagnostic Description

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.

Example of Incorrect Code

[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
}

Example of Code Fix

[PXUIField(DisplayName = "View Document",
    MapEnableRights = PXCacheRights.Select,
    MapViewRights = PXCacheRights.Select)]
[PXButton]
public virtual IEnumerable viewDocument(PXAdapter adapter)
{
    //Implementation of the method
}

Related Articles

Mandatory Attributes