Groovy script to create Manual Price Adjustment
Hi,
Is there any method to add Manual Price Adjustment using Groovy? I have tried with the below code in an On-Save extension , but facing an error while trying to save.
while (lines.hasNext()){
def line = lines.next();
def mp = line.getAttribute("ManualPriceAdjustments");
def row = mp.createRow();
row.setAttribute("AdjustmentAmount",0);
row.setAttribute("AdjustmentTypeCode","PRICE_OVERRIDE");
row.setAttribute("ChargeDefinitionCode","QP_SALE_PRICE");
row.setAttribute("ReasonCode","ORA_OTHER");
row.setAttribute("SequenceNumber",1);
mp.insertRow(row);
}
Best Regards,
Vikram
0