I am a facing a weird problem where my code (specifically a record.save action) does not seem to be executed. The code is located in the ‘reduce’ phase of a suitescript 2.0 map/reduce script.
I have no clue what the cause for this might be. The logging does display ‘is this executed’ as stated in the example below but the lines below that not seem to be executed. The logging does not show ‘Order lines marked for order with ID:’.
//load the order
var SOrecord = record.load({
type: record.Type.SALES_ORDER,
id: orderId,
isDynamic: false
});
setLineValues(SOrecord, values, newShipmentId)
log.debug('Is this executed?');
//Save Order
var recId = SOrecord.save({enableSourcing: false, ignoreMandatoryFields: true});
log.debug('Order lines marked for order with ID: ', recId)
return recId;
Can anyone help?
Thanks in advance!