erictgrubaugh
10/03/2016, 3:31 PMfunction clientPostSourcing(type, name) {
// Execute this code when all the fields from item are sourced on the sales order.
if(type === 'item' && name === 'item')
{
// After all the fields from item are sourced
var rate = nlapiGetCurrentLineItemValue('item', 'rate');
var line = nlapiGetCurrentLineItemIndex(type);
if(rate < 10)
{
nlapiSetCurrentLineItemValue('item', 'rate', 20);
}
}
}