You need to sign in to do that
Don't have an account?
AnantGarg
Getting error while creating reduction order programmatically
I am trying to create a reduction order for an already created order. Though reduction order is being created successfully, it is returning this error:
Refund Order Error: field integrity exception: OriginalOrderId (reduction orders may not reference other reduction orders for reduction)
I have correctly passed the required parameters as:
Why do I get this error? How can I fix it?
The original order is not a reduction order though
Refund Order Error: field integrity exception: OriginalOrderId (reduction orders may not reference other reduction orders for reduction)
I have correctly passed the required parameters as:
Order reductionOrder = new Order( IsReductionOrder = true, OriginalOrderId = originalOrder.Id, Pricebook2Id = originalOrder.Pricebook2Id, EffectiveDate = originalOrder.EffectiveDate, Status = 'Draft', AccountId = originalOrder.AccountId); insert reductionOrder;
Why do I get this error? How can I fix it?
The original order is not a reduction order though
All Answers
Make sure that Enable Orders is selected.
Select Enable Reduction Orders.
Save your changes.