Script to create a WMS Wave record fails when creating from transfer orders
Hello,
I’m looking for some help trying to script a wave record (WMS bundle) from a Transfer Order. I have succeeded in creating the wave from a Sales Order record. However, whenever it is from a transfer order I get the error: “Unable to generate a wave for orders with subitems or components that are kits or packages. All subitems or components must be fully committed.”. This seems like a catchall error from NetSuite, as I have double checked all sublist items are fully committed and none of them are kits or packages.
In my script, I logged the payload right before running record.save(), once for creating from a sales order, which succeeded, and once for a creating from a transfer order, which failed. I have attached the payloads with some account info removed. From what I can tell everything looks normal. Any ideas out there on what might be the cause from looking at these payloads?
Note: by default, when running record.create({type: record.Type.WAVE}) the waveType is set to SalesOrd. For transfer orders I run setValue({fieldId: “wavetype”, value: “TrnfrOrd”}) on the record, which the script seems to accept.
Any guidance would really help. I have been stuck on this for days. Thanks in advance.
Success (From sales order):
{ "type": "wave", "isDynamic": true, "fields": { "wfinstances": "", "nlloc": "0", "nlsub": "1", "custbody_ava_taxdateoverride": "F", "creatorId": "3", "custbody_ava_taxoverride": "F", "type": "wave", "nldept": "0", "custbody62": "F", "custbody70": "F", "templatestored": "T", "custbody_close_wo": "F", "picktype": "SINGLE", "ntype": "76", "baserecordtype": "wave", "intent": "SAVE_AND_GENERATE", "custbody_dpe_spec": "", "calcrecommendedbins": "F", "haslines": "F", "customform": "185", "nlapiCC": "F", "custbody_ava_shippingtaxinclude": "F", "wavetype": "SalesOrd", "location": "16", "custbody_dpe_volume": "", "custbody_ava_taxcredit": "0.00" }, "sublists": { "lineitems": { "currentline": { "transactionId": "", "transactionLineId": "", "#": "3" }, "line 1": { "transactionId": "19308111", "transactionLineId": "1" }, "line 2": { "transactionId": "19308111", "transactionLineId": "5" } } } }
Failure (from transfer order):
{ "type": "wave", "isDynamic": true, "fields": { "wfinstances": "", "nlloc": "0", "nlsub": "1", "custbody_ava_taxdateoverride": "F", "creatorId": "3", "custbody_ava_taxoverride": "F", "type": "wave", "nldept": "0", "custbody62": "F", "custbody70": "F", "templatestored": "T", "custbody_close_wo": "F", "picktype": "SINGLE", "ntype": "76", "baserecordtype": "wave", "intent": "SAVE_AND_GENERATE", "custbody_dpe_spec": "", "calcrecommendedbins": "F", "haslines": "F", "customform": "185", "nlapiCC": "F", "custbody_ava_shippingtaxinclude": "F", "wavetype": "TrnfrOrd", "location": "16", "custbody_dpe_volume": "", "custbody_ava_taxcredit": "0.00" }, "sublists": { "lineitems": { "currentline": { "transactionId": "", "transactionLineId": "", "#": "3" }, "line 1": { "transactionId": "19373098", "transactionLineId": "1" }, "line 2": { "transactionId": "19373098", "transactionLineId": "4" } } } }
Will