Loading ...

When to use PXSelector and PXDimensionSelector in Acumatica?

Acumatica provides two powerful tools for managing value selection: PXSelector and PXDimensionSelector. Let’s break down their differences, when to use each, and show a simple example.

What is PXSelector?

PXSelector is ideal for basic data selection, where no strict format is required.
Example: selecting a vendor or a customer.

[PXSelector(

    typeof(Search<Vendor.bAccountID>),

    SubstituteKey = typeof(Vendor.acctCD),       

    DescriptionField = typeof(Vendor.acctName))]

The user selects a vendor from a list by its code (acctCD). In this case, no specific format is enforced.

What is PXDimensionSelector?

PXDimensionSelector is used for data with segments, where the structure matters (e.g., XX-YY-ZZ).

[PXDimensionSelector(

    "ACCOUNT",                                                         // Dimension name

    typeof(Search<Account.accountID>),

    typeof(Account.accountCD),                                  // Segmented key (e.g., 1010-01)

    DescriptionField = typeof(Account.description))] // Account description

The user selects an account where the code consists of segments separated by dashes. The system enforces structure validation.

 

Example Usage

Field 1: Vendor (PXSelector)


The user selects:
VENDOR01 - Main Supplier

Field 2: Account (PXDimensionSelector)


  The user inputs:
1010-01

  The system validates the segments and displays:
1010-01 - Cash Account

Comparison Table

Feature

PXSelector

PXDimensionSelector

Segment Support

False

True

Structure Validation

False

True

Flexibility

Easy for simple data

Advanced setup for structured data

Auto-Completion

False

True

Performance

Slightly faster, no segment checks

Slower due to validation

When to use?

  • PXSelector:
    For basic data, no strict format required (e.g., VendorID, CustomerID).

 

  • PXDimensionSelector:
    For segmented data with enforced structure (e.g., accounts, item classes).

Both tools create intuitive user interfaces:

  • Use PXSelector for simplicity.
  • Choose PXDimensionSelector for structured data with enforced format.

Success in development and using the right tools!