I am trying to add a post process BPM to place items in nonconforming after Erp.ReceiptsFromMfg.ReceiveMfgPartToInventory. I have to do an External dll since a table name is shared by the 2 BOs. I have Created the dll and when I try and test, nothing is happening. Is there some way to see the errors or to see what may be happening. Here is the code I have. Not sure what I need to do to correct.
public void ReceiveMfgPartToInventory(
Erp.Tablesets.ReceiptsFromMfgTableset ds,
ref System.Decimal pdSerialNoQty,
ref System.Boolean plNegQtyAction,
ref System.String pcMessage,
ref System.String pcPartTranPKs,
ref System.String pcProcessID,
Ice.Tablesets.ContextTableset context)
{
foreach (var row in ds.PartTran)
{
string whs = "Seymour";
string RowMod = "A";
string ReasonCode = "";
string PartNumber = row.PartNum;
decimal Qty = row.QtyCompleted;
string EmpID = "";
string Lot = row.LotNum;
string Bin = row.BinNum;
string UOM = row.UM;
string Revision = row.RevisionNum;
if (string.IsNullOrEmpty(ReasonCode))
{
ReasonCode = "QAR";
EmpID = "07517";
}
var nonConfBO = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.NonConfSvcContract>();
var nonDS = nonConfBO.AddNonConf("Inventory");
nonDS.NonConf[0].ReasonCode = ReasonCode;
nonDS.NonConf[0].PartNum = PartNumber;
nonDS.NonConf[0].Quantity = Qty;
nonDS.NonConf[0].EmpID = EmpID;
nonDS.NonConf[0].LotNum = Lot;
nonDS.NonConf[0].WarehouseCode = whs;
nonDS.NonConf[0].BinNum = Bin;
nonDS.NonConf[0].ToWarehouseCode = whs;
nonDS.NonConf[0].ToBinNum = Bin;
nonDS.NonConf[0].ScrapUM = UOM;
nonDS.NonConf[0].RevisionNum = Revision;
nonDS.NonConf[0].RowMod = RowMod;
bool requiresUserInput = false;
string binWarning = "";
nonConfBO.PreUpdate(ref nonDS, out requiresUserInput, out binWarning);
nonConfBO.Update(ref nonDS);
}