/
How to remove manual override

How to remove manual override

Question 1

In the following code, I have an issue with api.removeManualOverride():

if (api.isInputGenerationExecution()) return if(!api.getElement("StrategyAllowsOverride")) {     api.removeManualOverride("PriceSelector")     api.removeManualOverride("ManualPrice")     api.removeManualOverride("ManualPriceReason")     api.logInfo("RemovedOverride") }

isInputGenerationExecution is supported from version 10.0. In older versions use isSyntaxCheck.

When this is executed, logInfo is printed but the manual override is not removed.

Answer 1

The element which has the following line api.removeManualOverride() must be before an element which is cleared.


Question 2

How do we reset or clear system provided “Manual Override” field, i.e., manualResultPrice field using groovy logic?

Answer 2

The above mentioned method removeManualOverride does not work for system provided manual override fields.

An alternative solution is to hide the default manual override fields and create your own. Or – at least for PGs – you can define an element that expires a manual result (does not remove it but expires it); for details see Manual Price Expiry.


Question 3

We have three manual override fields in a Price List. Is it possible to allow these fields to be editable when Price List is in submitted status? Our business case is that submitter will add values to fields (Marked as allow override) and submit a Price List. First level approver want to have an ability change those values.

Answer 3

It is not possible to modify the Price List after submission.

Related content

Price List Detail
Read with this
Why is the manualResultPrice not changed until the next calculation?
Why is the manualResultPrice not changed until the next calculation?
More like this
Make Price List/Grid Column Editable
Make Price List/Grid Column Editable
Read with this
How to add a manual editable attribute in a LPG, based on restricted fields (like the "option()" in Java for quotes?
How to add a manual editable attribute in a LPG, based on restricted fields (like the "option()" in Java for quotes?
More like this
Live Price Grid Detail
Live Price Grid Detail
Read with this

Found an issue in documentation? Write to us.