We have been using Orders and Order Products for about a year in a really fundamental way, just to feed into a custom built Invoice object. It's recurring monthly Invoicing, so the values on the Orders can change from month to month. I am now suddenly getting errors when attempting to edit some Order Products that "You can't update Quantity because the order product has been reduced." I understand from Salesforce Documentation that Order Products are not editable after they have been reduced, I just can't find any explanation of what "reduced" means.
We have the 'Reduction Orders" option ticked in Setup, but we've never created any that I know of. I don't actually really understand what they are, as we sell services and don't do returns. I thought maybe just deactivating an order, reducing a quantity, and reactivating the Order might trigger this behavior, but I haven't been able to reproduce it on other orders in that way. I haven't yet found the commonality in the Orders of ours that are displaying this behavior.
What does it mean that we've "reduced" the Order Product? How can I replicate it/avoid accidentally doing it in the future? And is there a way around this limitation now that some of our Orders are not editable, or do we have to scrap them and create new ones?
Best Answer
Reduction Orders covers what it is referring to:
OrderItem has a lookup to itself called
OriginalOrderItemId
The current
OrderItem
you're editing is most likely being referenced in this lookup in one of your otherOrderItems
in the org. As it's referenced, it's assuming it's a reduction order item. This error will be thrown when updating certain fields on a reduction order item.In your error message, it says you're updating
Quantity
.OriginalOrderItemId
is not updateable so you will have to delete the OrderItem (and presumably, re-create afterwards) that is referencing the one you're trying to update to freely edit Quantity.