Dear Epicor’ist,
I am writing BPM which will create a shipment pack line based on number of allocation against the order release in PartAlloc table.
When i invoke GetManifestInfo method, system throws “Record not found” error.
if i comment out GetManifestInfo method, its reaching the Update/UpdateMaster method line but, throwing EntityException error.
Any suggestions in handling this issue?
var partAlloc = (from row in Db.PartAlloc where row.Company == Session.CompanyID && row.OrderNum == this.ordnum && row.OrderLine == this.ordline && row.OrderRelNum == this.ordrel select row);
foreach(var partLoc in partAlloc)
{
string crdtmsg = “”; string shipToCustList = “”; string flag = “”; bool flag1 = false;
string Part=""; string msg=""; bool flag2=false; bool flag3 = false;
string whse=""; string whsebin=""; int temp=0; int pickedQty = 0;
using (Erp.Contracts.CustShipSvcContract packslipDtl = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.CustShipSvcContract>(this.Db))
{
this.packdtl = packslipDtl.GetByID(packNum);
Part = partLoc.PartNum.ToString();
whse =partLoc.WarehouseCode.ToString();
whsebin = partLoc.BinNum.ToString();
pickedQty = Convert.ToInt32(partLoc.PickedQty);
packslipDtl.POGetNew(0, packNum, out msg);
packslipDtl.POGetDtlList( packNum, "",0,"PACK",out msg);
packslipDtl.GetNewOrdrShipDtl(ref this.packdtl, packNum, 0);
packslipDtl.GetOrderInfo(ordnum, out crdtmsg, ref this.packdtl);
//packslipDtl.GetManifestInfo(ordnum, this.packNum, ref this.packdtl);
shipToCustList = "";
packslipDtl.BuildShipToList(ordnum, 0, out shipToCustList);
packslipDtl.BuildShipToCustomerList(ordnum, out shipToCustList);
shipToCustList = "";
packslipDtl.BuildShipToList(ordnum, 0, out shipToCustList);
packslipDtl.CheckPrePartInfo(ref Part, ordnum, ordline, out msg, out flag1, out msg, out Part);
packslipDtl.GetOrderLineInfo(ref this.packdtl, 0, this.ordline, Part);
packslipDtl.GetOrderRelInfo(ref this.packdtl, 0, this.ordrel, true);
shipToCustList = "";
packslipDtl.BuildShipToList(ordnum, 0, out shipToCustList);
shipToCustList = "";
packslipDtl.BuildShipToCustomerList(ordnum, out shipToCustList);
//this.packdtl.ShipDtl[0].BinNum =whsebin;
//this.packdtl.ShipDtl[0].WarehouseCode =whse;
//this.packdtl.ShipDtl[0].SellingInventoryShipQty = pickedQty;
//this.packdtl.ShipDtl[0].BinType = "Std";
//this.packdtl.ShipHead[0].RowMod = "U";
packslipDtl.CheckPCBinOutLocation(ref this.packdtl, out temp , out flag3,out msg);
//packslipDtl.UpdateMaster(ref this.packdtl,false, false, false,false, false, false, false,packNum, this.custnum, out flag, out flag, out flag, out flag, out flag, out flag, out flag, out flag, out flag, out flag, out flag1, out flag1, out flag, out flag, out flag1, out flag1, out flag1, out flag1);
packslipDtl.Update(ref this.packdtl);
}
}