Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.24 KB

PX1012.md

File metadata and controls

37 lines (27 loc) · 1.24 KB

PX1012

This document describes the PX1012 diagnostic.

Summary

Code Short Description Type Code Fix
PX1012 PXAction is declared on a non-primary view. Warning (ISV Level 2: Production Quality) Available

Diagnostic Description

Only the actions that are declared on the primary DAC of the primary view are available on the toolbar. You have to change the type parameter of PXAction to the primary DAC if you want the action to be displayed on the toolbar.

The code fix changes the type parameter of PXAction to the primary DAC of the primary view.

Example of Code that Results in the Warning

public class SomeEntry : PXGraph<SomeEntry, Primary>
{
    public PXSelect<Primary> Documents;
    public PXSelect<Detail> DocumentDetails;
 
    public PXAction<Detail> Release; // The PX1012 warning is displayed for this line.
}

Example of Code Fix

public class SomeEntry : PXGraph<SomeEntry, Primary>
{
    public PXSelect<Primary> Documents;
    public PXSelect<Detail> DocumentDetails;
 
    public PXAction<Primary> Release;
}