Posting to Business Objects by ForEach Iteration over an array
I have the Business Object ShipmentHistory3 and function "createDataArray" which retrieves an array of items of the get_ShipmentHistory3 type. Array contains 11.5K records. I want to iterate over the array, posting the array's elements to the Business Object.
See screenshots forEach.PNG and Flow.PNG.
For that I created the ForEach Loop, that goes over the retrieved array. On every iteration the loop posts to the Endpoint. See Assignment.PNG screenshot attached.
However, when the function runs the Business Object is not being updated.
One other thing I tried is assigning the function to a temp array, to post the data from it. Screenshot Assignment2.PNG. It only assigns the first row 11.5K times. I tried replacing "item[" with "item[$current.index]" but that didn't work either.