I'm trying to configure an import step into NetSuite that converts a Sales Order to an Item Fulfillment and makes sure only certain items on the items sublist have the "fulfill" checkbox checked.
My mappings are below and I'm currently getting an error saying that I'm attempting an invalid sublist operation. I've highlighted the lines that are causing this (removing these mappings prevents the error). This import is using the SuiteApp SuiteScript 2.x version. Interestingly I've done similar things previously with the 1.0 version and didn't get this error with similar mappings. So I'm wondering if anyone here has run into this, or if there is a better way to configure the mappings to get what I'm looking for (only have box checked for items in the import data).
Also worth noting that I've tried setting "replace all lines" to true on the items sublist as well as checking the "use as key field" on the "Items : Item" field, both lead to the same invalid sublist operation error.
The error contains this code, which does not appear to show what is happening on the item sublist, only the packages one, which is odd to me, and doesn't help troubleshooting much.
importing record {"index":0,"retryCount":0}
{"nlobjRecordType":"itemfulfillment","nlobjFieldIds":{"celigo_recordmode_dynamic":"true","celigo_nlobjTransformType":"salesorder","celigo_nlobjTransformId":123456,"generateintegratedshipperlabel":"false","celigo_replaceAllLines_packagefedex":"true"},"nlobjSublistIds":{"packagefedex":[{"packageweightfedex":"1","packagetrackingnumberfedex":"123456"}],"item":[{"itemkey":"11111","itemreceive":"true"}]}}
nlapi calls registered for $R:
r = NRecord.transform({"fromType":"salesorder","fromId":22222,"toType":"itemfulfillment","defaultValues":{"recordmode":"dynamic"}});
r.setValue({"fieldId":"generateintegratedshipperlabel","value":false});
r.removeLine({"sublistId":"packagefedex","line":3});
r.removeLine({"sublistId":"packagefedex","line":2});
r.removeLine({"sublistId":"packagefedex","line":1});
r.removeLine({"sublistId":"packagefedex","line":0});
r.selectNewLine({"sublistId":"packagefedex"});
r.setCurrentSublistValue({"sublistId":"packagefedex","fieldId":"packageweightfedex","value":"1"});
r.setCurrentSublistValue({"sublistId":"packagefedex","fieldId":"packagetrackingnumberfedex","value":"11111"});
r.commitLine({"sublistId":"packagefedex"});