Hey all - I can't seem to get past this NetSuite I...
# general
a
Hey all - I can't seem to get past this NetSuite Item Fulfillment Import (API) error.
Copy code
"Failed to save record because You must enter at least one line item for this transaction."
This is what the IF looks like when I try to do it from the UI. Thoughts?
Copy code
04/18/2022 5:15:33 pm	importing record 0	{"nlobjRecordType":"itemfulfillment","nlobjFieldIds":{"customform":145,"celigo_recordmode_dynamic":"true","celigo_nlobjTransformId":5302},"nlobjSublistIds":{"item":{"lines":[{"itemname":"V-274585","itemreceive":"true"}]}},"documentIndex":0}

04/18/2022 5:15:34 pm	nlapi calls registered for $R	r = nlapiTransformRecord("salesorder", 5302, "itemfulfillment", {"recordmode":"dynamic","customform":145});
r.selectLineItem("item", 1);
r.setCurrentLineItemValue("item", "itemname", "V-274585");
r.setCurrentLineItemValue("item", "itemreceive", "T");
r.setCurrentLineItemValue("item", "line", "1");
r.commitLineItem("item");
nlapiSubmitRecord(r, false, false);
b
usual causes for this type of error is missing a transform value
pay attention to the url's query parameters while creating a fulfillment to find transform values
for your particfular code, it may also be that the first line isnt actually 1
a
found that there was no inventory for that item at the Location specified at the SO Header level.
Once I added inventory it went though. But I will also keep your advise in mind moving forward, thank you for the reply.
b
i think $R is using the item name to do matching, which will fail if there are multiple lines with the same item
a
Interesting. That is actually just code from an iPasS that is configured for the integration.
I don't know much about SuiteScript.
In this case, there was only one item on the SO and it did have a lineID = 1
b
you only mapped the item
that will fail when the item is not unique
a
They are car sales where ever item is unique by name. So I think i am good in this case.
b
depends on if you have 2 lines with the same item
257 Views