One to many not importing any records
I have the following JSON structure coming from the previous step (where respData was the response of a response mapping):
[
{
"id": "10000001",
"recordType": "salesorder",
"Document Number": "SOXXXXXX",
"respData": {
"orderNo": 123456,
"customerOrderNo": "7890",
"lineItems": [
{
"id": 987654,
"lineItemId": 50150,
"orderNo": 123456
},
{
"id": 987655,
"lineItemId": 50151,
"orderNo": 123456
}
],
"customFields": {
"deliveredDate": null
}
}
}
]
I want the next step to execute as many times as there are lineItems in the lineItems array.
My understanding is that the one-to-many path should be respData.lineItems, however it imports zero records.
I tried several combinations, but nothing works.
I also tried sending just one record by disabling one-to-many and I just send respData.lineItems[0].myField - this works fine and the target application receives the record. The one-to-many won't work though. No error message, but also no records created.
1
Comments
Milcho Dimkov can you remove the one-to-many, add a preMap script, then force an error by putting a script function that doesn't exist in the preMap script itself? I'd like to see what you're given there.
Also, what destination application are you going to?
Please sign in to leave a comment.