NetSuite Item Fulfillment Checking "Fulfill" Checkbox On Item Sublist
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"});
Comments
The NetSuite connector doesnt support iterating over more than one source-array afiak, so to get it to fill the item lines you would need to remove the trackingnumber/packages mapping.
Hi Jon Lamb,
Can you confirm the itemKey 11111 is a valid item internal Id? Mostly you see an "invalid sublist or line item operation" because of invalid item id or itemKey 11111 is not present in Salesorder record.
Thanks,
HiJon Lamb
Has the issue mentioned above been solved?
Actually, we are facing a similar issue. By using version 1.0 we were able to provide Dynamic mode in mapping. But now the import is using the SuiteApp SuiteScript 2.x version and an error is created after giving Dynamic Mode as true in Import mapping.
The error we are getting is: Failed to create, update/transform record because You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist. Tip: Please make sure that all the line items that you're trying to use exist on the record.
If you solved your issue please provide the steps you have done in your flow to solve it.
Unfortunately I ended up reverting back to the 1.0 version, kept all the mappings the same and everything is working again. Something about the itemkey mechanic in the 2.0 version seems to have a bug in it, at least as far as I can tell.
Jon Lamb Could you provide some guidance. We are receiving below error in both SuiteScript 1 and SuiteScript 2.
Message:
Failed to create, update/transform record because Transaction type specified is incorrect.
Code: invalid_trans_typ
This is how our mapping looks:
Bhargav Mashru The issue you're having does not seem to be related to the issue I posted. Whatever is in your nsOrder.recordType variable is not a compatible transformation for whatever your import record type is. Probably need to reach out to Celigo support.
Hi Jon Lamb
How we can revert back to version 1.0, could you please provide the steps?
Hi Rosemol Joe
We get the option to set the SuiteScript version at the time of creation of the import, once created it can only be changed via backend and not through UI. The available option using UI is, to delete and re-create the import, and select required version at the time of creation.
Thanks.
Please sign in to leave a comment.