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 (enum) |
-- |
The Pricefx object type to mass-edit (e.g., |
|
|
String |
-- |
Name of the filter bean that selects which records to edit. |
|
|
String |
-- |
Comma-separated field definitions in the format |
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
<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&filter=massEditFilter&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:
<!-- 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, notfieldName: In the legacydsMassEditXSD element, eachfieldsub-element usesnameandvalueattributes. Do not usefieldName-- 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
filterparameter 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 thepfx-api:masseditURI form.