You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy script to create Manual Price Adjustment

Accepted answer
41
Views
3
Comments

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!