BPM not firing (PartTran)

Out of the blue my PartTran BPM which is triggered when I report qty in MES has stopped firing. It’s very strange, I changed nothing with the BPM. Out of about 15 tries, it did work once, which is even more baffling.

The only thing I’ve done is add a UD field to Part_UD and I have not synced the tables/regen’d the data model. I am not doing anything with that newly added field by the way.

Could that be related? I hope not since I don’t have access to do those things :confused:

Maybe… if the internal Epicor structure sees the new field but the database doesn’t that could cause issues… but I am not 100% sure if that’s what’s causing it

I assume you’ve tried enabling / disabling etc?

No I didn’t try that - but I did now to no effect.

I deleted the column from the UD table and E10 now tells me we are back in sync but the problem still exists.

I had another issue today, a bug I found, not sure if it’s related but it happened just before I noticed this problem (@Bart_Elia @aidacra):

On MES screen, while logged into a job, if you click Downtime the Downtime screen pops up. If you cancel it, the Report Quantity button on the main MES screen gets disabled (Greyed Out). To fix it I went back to downtime, set a downtime status , then reentered to turn off the downtime status. Report Quantity button then became available again.

The next time I duplicated the bug I tried the same remedy but this time it immediately popped back up the Downtime screen after I clicked to turn off the downtime status. At this point, I clicked cancel and ALL my MES buttons are disabled EXCEPT the Report Quantity. :scream: Just to explore the madness, I attempted to report quantity (no BPM fired again) but once the report quantity screen closed, now all buttons on PRODUCTION tab are disabled and it shows me in downtime again.

Closing the MES and reopening also re-enables the buttons.

Also, I’d like to add that I see no records being added to the PartTran table (no wonder the BPM wont fire)

OK - so don’t forget about the bug I mentioned but I have found the problem.

I have some customization on my Report Qty screen that locks the Current Qty edit and allows the user to select a number of boxes, the part db knows how many pieces per box so I do the math and populate the the dataview “RQ”, column “CurrentQty”.

When I update that dataview, the Current Qty edit updates with the value automatically. For some reason though, if I don’t at a minimum ENTER (as in get my cursor in the box) the Current Qty edit, the record will not save. It’s strange because I am pretty confident that was previously working.

For anyone looking for the solution

I solved it by digging through the methods of the NumericEdit using ILSPy and came up with this solution to trick it into doing it’s magic:

String msg;
//QtyEdit is a ref to CurrentQty numeric edit
msg = String.Format("Report {0} pieces ({1} boxes) of part {2}?",QtyEdit.Value, BoxCnt.Value, epiTextBoxPart.Text);
var result = MessageBox.Show(msg,"Confirm Action",MessageBoxButtons.YesNo);
if (result == System.Windows.Forms.DialogResult.Yes) 
{
EpiButton OkBtn = (EpiButton)csm.GetNativeControlReference("2990b4f2-45f7-4155-ad6a-80fefb2c3a8e");
EpiDataView edvRQ =  (EpiDataView)(oTrans.EpiDataViews["RQ"]);

edvRQ.dataView[edvRQ.Row]["CurrentQty"] = QtyEdit.Text;
oTrans.LastView = edvRQ;
oTrans.LastControl = QtyEdit;
oTrans.focusLast();
OkBtn.PerformClick();   //REPORT THE QTY
}
```

<img src="/uploads/default/original/1X/05093962246f27273124c89ad7bb1c79df404a9c.png" width="690" height="369">

Here are the customizations I've made (for Morgan Freeman):
Locked Current edit
Added Boxes to Report
Added PN,Description,PartsPerBox (pulled from Parts db)
Added ReportQty button to hijack the OK button 
Added Create Master Label button to handle those specific labels (std labels are auto in BPM)

I have to say, for a lifespan of 4 months Epicor experience, I am pleased. I owe about 90% of that to you fine folks here at E10Help.com! Thanks!
1 Like