this is probably a noob question.... but I am tryi...
# sdf
m
this is probably a noob question.... but I am trying to add a 10% markup to the shippingcost field of the item fullfilment record in "beforeSubmit" context and setValue isn't working... what piece of the puzzle am I missing?
function beforeSubmit(scriptContext) {
var thisRecord = scriptContext.newRecord;
var shipping = parseFloat(noNull(thisRecord.getValue('shippingcost')));
var shipHawkCost = parseFloat(noNull(thisRecord.getValue('custbody_shiphawk_shipping_cost')));
if(noNull(shipHawkCost)){
log.debug('shipHawkCost',shipHawkCost);
log.debug('shipping-before',shipping);
shipping = shipHawkCost+(shipHawkCost * .1);
thisRecord.setValue('shippingcost', shipping.toFixed(2));
log.debug('shipping-after',shipping);
log.debug('shipping-afterround',shipping.toFixed(2));
}
}
all of the logs execute.
s
you might get more response if you posted this under #C29HQS63G
m
oh. thanks. ok. sorry about that. ill go there
👍 1