does anyone here know why the rate would adjust ba...
# suitescript
p
does anyone here know why the rate would adjust back to the last purchase price of an item? I have a script that sets the vendor on a po but when I set the rate back it goes back to the last purchase price
a
Which script type and how does it set the rate?
p
aftersubmit. it use setSublistValue to set the rate
I confirmed that rate is correct after save but it goes back to the last purchase price.
a
You probably need to set the price level to Custom which ID is -1:
Copy code
{
    sublistId: 'item',
    fieldId: 'price',
    value: -1 // Custom Price Level.
});
If you are doing it in a UserEvent afterSubmit then you need to load and save the record.
p
thanks! I think that fixed it
is there a way to display the price level field on a so?
it still did not work. it still sets the rate back to 2