Can you trigger an event based on a deleted MES Production Activity Row

Hello all, have been trying to trigger an automatic lookup and warning with a dynamic query after an employee completes a picking operation .

We issue material with a thing I inherited using a UD06 field and a data directive. It works 99.9% of the time but at 4000 jobs per week that’s a stockout, bad part setup, etc. throws our costs off by getting skipped.

I don’t think I can trigger a warning in the “End Activity” form, because at that point the material hasn’t been issued yet. I’ve been trying to detect when the Production Activity row is deleted from the ultragrid list in MES, and just can’t seem to get it.

I’ve tried before and after adapter on LaborDtl and MESControl; EpiDataView Notify on everything, and so on. I’m able to MessageBox methods but only “Initialize” and “reset”, and I can get the job number from the first row in the list as long as the row is there. But I can’t seem to detect when a row is removed from the list.

So generically, is there something I’m overlooking to detect an UltraGrid delete row event? Or does anyone know of a specific event trigger I’m overlooking?

Many thanks for any threads to tug on!

Ok, I’m going to figure this out and I’ll keep notes of working it out here. Every time I think I’ve got Epicor tools figured out I find myself feeling like the new guy again, and new guys have to pay more attention I guess…

So far based on @josecgomez here and @hkeric.wci here I have been able to get it to compile.

But it doesn’t seem to catch anything, so now I’m trying to think of some kind of a hack. Worst case scenario is maybe I can make users click a “Quality Check” button after each job, but that seems dumb

How about a pre-processing BPM on the End Activity method that does the check. if it does it pre-processing and throws an exception, it will stop the user before it removes the row. Seems like your approach of checking when the row is removed is “too late”.

That might do it - will a MessageBox from a directive return to the MES session?

1 Like

It should

So this didn’t quite work at least not the way I understood it. I put a method directive on LaborDtl.Update but couldn’t get a message box to return to the MES user’s screen.

It got me thinking and I tried a before adapter event on LaborDtl.Update() and that displays the message alright, but it’s still happening before the actual issue material.

It actually looks like by putting the automation on a UD06 directive, my predecessor backgrounded the process. This makes sense - and is actually pretty cool - but leaves me with no direct connection to it to say whether or not it successfully issued everything. When we upgrade later this year I’ll have to eFX everything but for now I have to stop the bleeding.

@SteveFossey I don’t think this will get a message to the user, but I do some post processing emails to quality to have them check stuff like this and I change the related operation of any backflush material that was added after kitting to final audit so it gets backflushed.
The deleted grid row is going to be a found like below in a pre processing directive. Then I put info I need in post processing in call context variables. Rather than alerting it did not happen find the problems, issue them post processing and send an email for follow up to be double sure they actually got issued in the second pass.

             /*this is an end activity*/
        if(ttLaborDtlRow.RowMod == "U" && ttLaborDtlRow.ActiveTrans == true && ttLaborDtlRow.ClockOutMinute != 24m)
        {