Epicor Function trap: Does KanbanReceiptSvcContract not behave the same as the Kanban receipt normal functionality?

I built an Epicor function that uses the KanbanReceiptSvcContract and takes its parameters as arguments. When I detect elsewhere that a part needs to be replenished via Kanban receipt, I can simply call my function with partnum, site, employee and qty.

However, we have been noticing inventory inaccuracies and have traced it to this function. This seems like a pretty bad gotcha.

When you try to Kanban receipt using the Kanban Receipt application, if a part material is FIFO and out of stock, the application refuses the Kanban receipt and warns you

The same thing happens if you use the BL Tester to run the KanbanReceipt business object based on tracing the Kanban Receipt app. As expected:

However, taking the exact same steps (getnew, changeemployee, validatestuff, preprocess, process) and using them in a function appears to defeat the FIFO check.

The Kanban receipt job executes and receives the finished part to inventory despite a job material being missing.

The job is completed and closed, and finished inventory is created despite the material not existing.

Basically posting this as a warning for others; but if anyone (@Bart_Elia ? Are you still the functions guru?) knows why eFx might allow this it would be greatly appreciated!

Hey Steve,

Are you calling the Business object from Custom Code? If so, is it possible that we wrapped the call in a try block and ignored the exception? :thinking:

Just want to rule out the possibility…

1 Like

I was hoping so, but no. After calling the final method, I send the response you’d normally see in the app to the server logs:

 kbCon.ProcessKanbanReceipts(ref kbDS, serQty, out cMsg);
             Ice.Diagnostics.Log.WriteEntry(cMsg + Environment.NewLine + "Part " + kbrPart + " Qty " + kbrQty.ToString() );

And out comes the message as if all was well:


I thought I was being so smart checking for that message, but it seems to just blip over the FIFO check entirely.

If anyone has any ideas , the full code is here:


Sorry, didn’t actually answer your question, and thanks for the support. At the end I also send the catch block to the server logs, and nothing is coming out.