โ02-03-2021 01:36 PM
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.
Here is the mapping currently.
โ02-11-2021 12:50 PM
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)