Hello Everyone!
I’m noticing an issue with the customer ship BO. What I want to do is build the shipment data set in one go before calling UpdateMaster. I notice when I call GetNewOrdrShipDtl() with the orderNum passed in when there is more than 1 shipDtl record it defaults the orderNum on the record to zero.
I can manipulate the data in a row manually, but I’d rather rely on the methods to do the heavy lifting for me. Is there a step I’m missing? I really dont want to do a get by id and update each time on each line, but if I have to I will. I also refered to this post but I’m still a little confused: BPM to Ship All from Bin
GetOrderInfo() does not work either, only on the first pack line.
Here is the meaty part of my code:
foreach (int orderLine in myOrderLines)
{
customerShipSvc.GetNewOrdrShipDtl(ref myCustShipDataSet, headerPackNumCreated, myOrderNum); //Need to manually increment pack line each time this is called.
foreach (var packLine in (from packLineRow in myCustShipDataSet.ShipDtl where packLineRow.PackLine == 0 select packLineRow)) //Select the row just created
{
packLine["PackLine"] = packLineNum; //Set the PackNum field to the non default value
}
customerShipSvc.GetOrderLineInfo(ref myCustShipDataSet, packLineNum, orderLine, prePartOrigPartNum);
customerShipSvc.GetOrderRelInfo(ref myCustShipDataSet, packLineNum, myOrderRelease, false);
packLineNum++;
}
customerShipSvc.UpdateMaster(ref myCustShipDataSet, false, false, false, false, false, false, false, headerPackNumCreated, 0, out opReleaseMessage, out opCompleteMessage, out opShippingMessage, out opLotMessage, out opInventoryMessage, out opLockQtyMessage, out opAllocationMessage, out opPartListNeedsAttr, out opLotListNeedsAttr, out shipCreditMsg, out cError, out compError, out msg, out opPostUpdMessage, out updateComplete, out checkComplianceError, out changeStatusError, out checkShipDtlAgain);
};