there is a setting in NS in Setup > Accounting ...
# suitescript
m
there is a setting in NS in Setup > Accounting > Accounting Prefs > Order Management where the field
landedcostperline
on Item Receipt records will be set as true if that setting is checked. I need that accounting setting as true, but I'd like to uncheck the
landedcostperline
checkbox based on subsidiary upon record creation from the PO. However, whenever that field is unchecked via user action, there is an alert in NS (screenshot attached) that doesn't allow that field to remain set via a simple client script. I think that is preventing a simple setValue in a CS from working. For example, if I do something like
if (subsidiary == 1 ){
context.currentRecord.setValue({
fieldId: 'landedcostperline',
value: false,
ignoreFieldChange: true
});
}
in the pageInit entry point, it will briefly set it to false, and then right back to true. I can set it in the beforeSubmit entry point of a UE -- maybe that's the best workaround, but I thought I'd ask here -- is there a way in the ClientScript to get around that alert? Thank you in advance!
r
Wouldn't unchecking it, will delete the landed cost of items for other subsidiaries as well for which you wanted to keep? You could potentially just create duplicate SKUs which are only available for those subsidiaries and on the item record keep the landed cost checkbox unchecked. On the other note, haven't tried doing this, so don't know a solution to your original question.