hello, i have a quick question.. i'm runnng a clie...
# suitescript
m
hello, i have a quick question.. i'm runnng a client scrypt on a quote form- calculating values for shipping rates and we using a custom percent field in the body, when I run a fieldchange funtion I'm getting an error back for Invalid Value type... any ideas
var freightperc = currentRecord.getValue({                 fieldId: 'custbody_shipping_perc'             });             console.log("freight factor is: " + freightperc);
var shippingRate = freightperc * .01 * currentCost * 1.15;
currentRecord.setCurrentSublistValue({                     'sublistId': 'item',                     'fieldId': 'custcol_quote_shipping',                     'value': shippingRate,                     ignoreFieldChange : false                 });
e
What's
shippingRate
just before you set the column value?
s
Also are you restricting this entry point? Field change on a body level field would not be able to use currentSublistValue since its a body field
m
i think i figure it out i was missing to declare the var 🙂.. almost got it to work