Another coding question. I had a BPM working in E9 that would stop receipt to inventory if all material was not issued to the job. I put it through the C converter from Epicor and it is now giving me the error that PCjobnum does not exist.
ReceiptsFromMfg.GetNewReceiptsFromMfgJobAsm
Pre-Processing
Synchronously execute code
After C# Conversion:
string MSG = string.Empty;
string ClassList = "WTOO, WTES, WQUA,WPLY,WLAY,WCOR,WASY,COMP,ADH,CON,CONE, CORE,FRZ,HDW,PAIN,TOOL";
Erp.Tables.JobMtl JobMtl;
Erp.Tables.Part Part;
foreach (var JobMtl_iterator in (from JobMtl_Row in Db.JobMtl
where string.Compare(JobMtl_Row.Company ,"CHS" ,true)==0&& JobMtl_Row.JobNum == PCjobnum && JobMtl_Row.AssemblySeq == JobMtl_Row.AssemblySeq && JobMtl_Row.MtlSeq == JobMtl_Row.MtlSeq
select JobMtl_Row))
{
JobMtl = JobMtl_iterator;
foreach (var Part_iterator in (from Part_Row in Db.Part
where Part_Row.Company == JobMtl.Company && Part_Row.PartNum == JobMtl.PartNum
select Part_Row))
{
Part = Part_iterator;
if (ClassList.Lookup(Part.ClassID) != -1 && JobMtl.IssuedQty == 0)
{
MSG = MSG + "\n" + JobMtl.PartNum;
}
}
}
if (!String.IsNullOrEmpty(MSG))
{
MSG = "The following parts have not been issued and so you cannot continue" + MSG;
CallContext.Current.ExceptionManager.AddBLException(MSG);
}
I think your BPM could be done just using widgets. The condition widget would do a query of the Job, for JobMtl’s that aren’t marked Issued Complete.
Hi,
That worked. I didn’t know I could right click, that’s going to be very helpful I don’t know why those lines are there, a co-worker wrote the original code.