2025-09-25T14:53:29.252Z server-connect:output repeatOrderLines: [
{
getPurchaseOrderHeader: {
id: '46e98fcd-9a07-4e60-8a5e-547c9f841b8c',
documentNo: '245227',
orderType: 'DR',
entryMethod: 'DR',
supplierRemitNo: 102508,
linkSalesOrder: 1845783,
odrDate: '2025-09-25',
requestedDate: '2025-07-22',
status: 'DF',
fulfillmentType: 'D',
region: 'DATL',
brandId: null,
brandName: null,
odrTotal: null,
supplierContact: null
},
getNextLineNo: undefined,
nextLineNo: 10,
getPurchasePrice: { status: 200, headers: [Object], data: [Object] },
purchasePrice: 4188,
extendedPrice: 8376,
createPurchaseOrderLine: { affected: 1, identity: 'f19cd5bf-bb8e-4af5-a42b-185137d9f8ed' },
CreatePOLines: undefined
},
{
getPurchaseOrderHeader: undefined,
getNextLineNo: undefined,
nextLineNo: 10,
getPurchasePrice: { status: 200, headers: [Object], data: [Object] },
purchasePrice: 4188,
extendedPrice: 8376,
createPurchaseOrderLine: { affected: 1, identity: '1ded2751-d7e6-4982-951f-8436504dc31e' },
CreatePOLines: undefined
},
{
getPurchaseOrderHeader: undefined,
getNextLineNo: undefined,
nextLineNo: 10,
getPurchasePrice: { status: 200, headers: [Object], data: [Object] },
purchasePrice: 4859,
extendedPrice: 9718,
createPurchaseOrderLine: { affected: 1, identity: '856405eb-d3bc-418a-ac32-08cab8537164' },
CreatePOLines: undefined
}
]
I believe I have found the bottleneck in the code. It seems like it’s only pulling “getPurchaseOrderHeader” only once and only applying it to the first repeat. This would explain why the value for the nextLineNo is always 10 because it defaults to an empty value when pulling “getNextLineNo”. Can anyone provide any fix to this, below is the server connect actions for this repeat: