pfx-api:massedit

pfx-api:massedit

Mass-edit records in Pricefx that match a filter. The fields to update and their new values are specified via the massEditFields parameter or through the legacy dsMassEdit XSD bean (deprecated since v1.2.0).

The method name is case-insensitive: both massEdit and massedit are accepted in the URI.


Parameters

Parameter

Type

Default

Description

objectType

ObjectType (enum)

--

The Pricefx object type to mass-edit (e.g., P, C, DMDS, PX, etc.).

filter

String

--

Name of the filter bean that selects which records to edit.

massEditFields

String

--

Comma-separated field definitions in the format fieldName;value,fieldName;value. Each entry is a semicolon-separated pair of field name and new value.


massEditFields Format

The massEditFields parameter uses the format:

fieldName1;value1,fieldName2;value2

For example, to set attribute1 to "Active" and attribute2 to "2026":

massEditFields=attribute1;Active,attribute2;2026

Each field is updated using the = (assign) operator.


XML Route Examples

Mass edit using URI parameters

XML
<pfx:filter id="massEditFilter">
    <pfx:and>
        <pfx:criterion fieldName="attribute3" operator="equals" value="PENDING"/>
    </pfx:and>
</pfx:filter>

<route>
    <from uri="direct:massEditProducts"/>
    <to uri="pfx-api:massedit?objectType=P&amp;filter=massEditFilter&amp;massEditFields=attribute3;APPROVED,attribute4;2026-03-27"/>
</route>

Legacy XSD bean (deprecated)

The dsMassEdit XSD element is deprecated since v1.2.0. Use the pfx-api:massedit component directly instead.

Important: The XSD uses the name attribute (not fieldName) on field sub-elements:

XML
<!-- DEPRECATED - use pfx-api:massedit with massEditFields parameter instead -->
<pfx:dsMassEdit id="myMassEdit" objectType="DMDS" filter="massEditFilter">
    <pfx:field name="attribute1" value="Active"/>
    <pfx:field name="attribute2" value="2026"/>
</pfx:dsMassEdit>

Common Pitfalls

  • XSD field attribute is name, not fieldName: In the legacy dsMassEdit XSD element, each field sub-element uses name and value attributes. Do not use fieldName -- it will be silently ignored.

  • Semicolon separator in massEditFields: Fields and values are separated by semicolons (;), not equals signs or colons. Pairs are separated by commas (,).

  • Filter is required: The filter parameter must be provided. Without it, the mass edit has no target records and will fail.

  • All matching records are updated: The mass edit applies to every record that matches the filter. Verify your filter criteria before running in production.

  • dsMassEdit is deprecated: The XSD bean approach (pfx:dsMassEdit) is deprecated since v1.2.0 and will be removed in a future release. Migrate to the pfx-api:massedit URI form.