Make Price List/Grid Column Editable
When the user needs to be able to modify the value calculated in a price list/grid column, you can make the field editable.
The value calculated by the logic element can be then manually overridden in the user interface of the price list/grid, provided the user has a required role for access and the price list is not locked (e.g. is not in Submitted or Approved state).
Configuration Steps
To make a price list field/column editable:
Modify the calculation logic:
Set the underlying logic element property "Allow Override" to true.
This is because behavior of price list columns is driven by the logic element properties.
See also “Allow Override” at https://pricefx.atlassian.net/wiki/spaces/UNITY/pages/4611605731.
If you want to offer the user a dropdown with a list of options, rather than an editable text field, you can configure this using the AttributedResult.withManualOverrideValueOptions() method.
To retrieve the user-entered value in any logic element, use the api.getManualOverride() method.
Deploy the modified calculation logic.
Recalculate the complete price list/grid to ensure this change is applied.
Important code considerations:
If a user manually overrides the result value, the next time the system calculates the result for that specific price list item, the corresponding logic element, which would normally calculate the result, will be skipped and will not be executed.
In editable/overridable logic element code, avoid executing operations with side effects, such as initializing or modifying objects stored in
api.global
orapi.local
that are then utilized in subsequent logic elements.
Found an issue in documentation? Write to us.