Job Receipt to Inventory not Make-to-Stock warning BPM conundrum

I’m developing a BPM for Job Receipt to Inventory to warn users when the job they are trying to receive to inventory is not a make-to-stock job, but am running into something beyond my understanding.

(My BPM itself is simple: 1) starts with a condition that checks for a designed query with row >= 1 where the JobProd.OrderNum is greater than 0 or the JobProd.TargetJobNum is not blank–this works perfectly; 2) Raise a warning message to user that this job should not be received to inventory)

I ran a trace on the UI when loading a job, which showed that the job entered is first called through the Job Entry BO by GetByID method, then through the GetNewReceiptsFromMfgJobAsm method on the ReceiptsFromMfg BO. The latter is where I first started to develop my BPM, because Job Entry made me think that it would apply to Job Entry/Tracker/other forms that pull in Job info, but was unable to get it to work. Only time it worked was after it loaded the job info and then I refreshed the form.

So when that didn’t work, I gave in to trying the JobEntry BO method like the trace was showing me it uses first. Got the BPM to work perfectly, except… it also appears when loading a job into the Job to Job Receipt form. Obviously I don’t want this to happen, because it will pop up with every single make-to-job receipt that is transacted there. I didn’t test it, but I’m also concerned that the BPM will fire in Customer Shipment Entry, too (for Make-to-Order jobs).

My question: How do I get this BPM to only fire within the Job Receipt to Inventory form?

(Secondary–probably rhetorical question–why does Epicor allow job-to-job receipts in receipt to inventory, to inventory in job to job receipt, etc. without any kind of warning at all, or at the very least have a way to turn this on/off in site/company configurations?? Seems like they should have made those two receipt forms a single one that populates the warehouse or job information based on the demand link type of the job.)

if( callContextClient.AssemblyName == "Erp.UI.RcptToInvEntry" )
    //Do the thing

Note: Haven’t tested in Web UI.

1 Like

It doesn’t, incoming…

In the web UI, you can hook to :

  • ValidateJobNum
  • ValidateJobNumJobType
  • GetDataSetForTree
if(callContextClient.ClientType == "Kinetic" && callContextClient.ProcessId == "JobEntryForm")
    //Do the thing
    callContextBpmData.Character01 = "Woot!";

Or for something simple like this, you could do a UI customization, just be mindful of what you
put in there. Try to keep the business logic on the server if you can.

Thank you so much! This got me pointed in the correct direction. There’s a condition type “The specified call context field is equal to the specified expression” that I was able to create using the information you provided here, that results in my BPM only firing on the Job Receipt to Inventory form.

(For this particular form, I’m currently only concerned about the Classic UI; we aren’t using Kinetic web and haven’t converted this form to Kinetic UI, yet.)

If you’re going to be at Insights this year, I owe you a drink (or something).

1 Like

drunk the rock GIF by ALL SEEING EYES