Add data to newly created LaborDtl record via MES

Hello All,
In the MES Report Quantity screen, I’ve added a text field bound to CallContextBPMData.ShortChar01.
Signed-in users will, throughout the day, report quantities from the active job. No problem there - they are even able to generate labels (Print Tags) for the produced material. Plain vanilla program - with a text field added.

Challenge: Whenever a quantity is reported, I need the contents of the custom text field to be saved in the LaborDtl.ShortChar01 field which is already added via UD Maint.

Problem: In UI Customization for Report Qty, I see no way to access the LaborDtl record it creates - the keys to which (LaborHedSeq, and LaborDtlSeq) do not appear in any of the associated adapters (oTrans) and is therefore inaccessible from within this BO.

As a result, I cannot execute the laborAdapter.GetDetails(lbrHedSeq, lbrDtlSeq) method to retrieve the newly created LaborDtl record from a UI customization. I also can’t seem to find a triggered method or data directive and a way to pass this value from the UI to such a BPM.

There are a few old(er) posts on this topic, so I know I’m not the only one struggling with this BO, but others were attempting to do things outside of the ‘normal’ clock in/ report qty /clock out process. I am staying completely within the lines - I just want to add addit’l data to each created LaborDtl record when it is created and I’m having one devil of a time. Any suggestions would be greatly appreciated.

You would be better off putting this in a BPM for two reasons:

  • Code in Screens will not upgrade to K21
  • You have access to the CallContextBPMData (hence the name) so you can easily assign it there.

No convincing necessary, Mark. I like this idea. Thanks!
I assumed there’d be, at least, a chance I’d find my data where you said. I just can’t seem to find a directive that fires when ReportQty is run. I’ve tried setting pre & post directives (on BO.LaborDtl.GetNewLaborDtl and BOLaborApproval.GetNewLaborDtl) to simply insert a “TEST” into the ttLaborDtl.ShortChar01 field, to no avail.

Are you aware of a better way to get a trace, than the usual Tracing Options from the UI? All it shows nothing about Labor methods firing.

In this particular case, you know the table that you want to update - LaborDtl. So I would lean toward a Data (vs Method) Directive since this is a very lightweight update.

1 Like

“Easy when you know how”
I thought I had tried a Data Directive.
:zipper_mouth_face:

Nothing further… Except “Thanks!”

1 Like

Been there myself @Andrew!

1 Like