cancel
Showing results for 
Search instead for 
Did you mean: 

NetSuite Item Fulfillment

spitfirect1
New Contributor II

Hi Team,

I am working with a pipeline to grab a Item Fulfillment record under one subsidiary and then transitioning that IF to a new IF in the other. It is a 1 for 1 transaction on our side, so the data that we pull will be the same as the data input under the new company. That being said I continue run into the error below. I will post my mapping as well. I have tried a few different things and still seem to cum up short on this one and would love some insight.

image

Here is the mapping currently.

image

35 REPLIES 35

spitfirect1
New Contributor II

The following seemed to work alot better.

sl.ensureArray($.get(‘tranSales:inventoryDetail’))

However I am getting an error that says we cannot add a ‘inventory detail to this line’. What is happening is that even if the inventory detail does not exist it is adding it to the record as ‘null’ however netsuite does not want it added in the item list at all. See output stream below. I attempted to go back to the root mapper and add a ‘if/then’ statement but it just loops. Take a look and let me know if I am on the right track or if there is another way to exclude the ‘inventory detail’ when inventory detail does not exist in the item tree.

jsonPath($, “[‘soapenv:Body’].getResponse.readResponse.record[‘tranSales:itemList’][‘tranSales:item’][].hasOwnProperty(“tranSales:inventoryDetaill”) ? sl.ensureArray(jsonPath($, "[‘soapenv:Body’].getResponse.readResponse.record[‘tranSales:itemList’][‘tranSales:item’][][‘tranSales:inventoryDetail’][‘platformCommon:inventoryAssignmentList’][‘platformCommon:inventoryAssignment’]”)) : jsonPath($, "[‘soapenv:Body’].getResponse.readResponse.record[‘tranSales:itemList’][‘tranSales:item’][*]

(Note: if I place ‘null’ as the else then it places all of them as null)

image