I'm using a 1.0 client script to convert line item...
# suitescript
p
I'm using a 1.0 client script to convert line items on a sales order to a different unit of measure, i'm using the following
Copy code
nlapiSelectLineItem('item', i);
nlapiSetCurrentLineItemValue('item', 'units', itemObj['uom']);
nlapiSetCurrentLineItemValue('item', 'quantity', itemObj['qty']);
nlapiSetCurrentLineItemValue('item', 'rate', itemObj['rate']);
it changes the units fine, it changes the quantity fine, however the rate field just remains blank and causes the script to stop and doesn't move onto the next line item in the list. any ideas?
b
if you arent sharing all your code and are committing the line, then you want to use the synchronous parameter
p
That it appears I do, I wasn't aware of that previously, added in and it works perfectly. thanks!