BPM for ReciptsFromMFG

We want to create a BPM that will stop a user from receiving the part to stock if it is a NonInventory Item. If it is a make to order job we don’t want it in inventory. I had thought the way to go would be a method directive (Pre-Process) on the ReceiptsFromMfg. I got this from the trace, but I can’t figure out how to connect the receipt in a query to the PartFile to check for the NonStock condition is true.

I know very little about BPM’s and I’m not a coder so I’m struggling to figure out how to make the connection in the BPM condition.

I’ve had to do similar conditions on a BPM, one thing that worked for me was create a condition and connect it to a exception. The condition is “MyQuery is more or equal to 1”

On the query itself, join the temp table to the Part Table and add a condition of “NonStock = true”
The tables joins would just be company to company & partnum to partnum.

image

Note, haven’t tried this exact scenario but its worth giving it a shot here.

Be careful when you do this, that condition block can cause serial number issues due to a bug in Epicor.

image
I actually tried that first, so I guess I shouldn’t feel so bad, but this is the error I keep running into. It’s doesn’t seem to be making the connection.

Yeah I got that error at first too, you need to do lower case true. so ( NonStock = true )

Thanks! That got rid of the error but it’s not firing the exception.

What method are you using out of curiosity?

Thank you Doug - I will likely need to tap our consultant to help write the custom code. Many of our nonstock items serialized so this is a concern. Appreciate it!

I’ve tried several - the trace showed me GetNewReciptsFromMfgJobAsm (i’m not great at reading the trace files) after your post I tried GetNetReciptsFromMfg - still no luck.

The last one I’d try is ReceiveMfgPartToInventory but to Doug’s point, be cautious of that bug, I wasn’t aware of it prior to making a suggestion. Good luck!

image

Thanks for your help! I’ll post when I get a solution.

1 Like

That did the trick! it’s working. Now we are going to do some testing for the serial number issue. We don’t assign serial numbers until the time of shipment and as I understand it, they manually put in the starting and ending numbers so I think we may be ok on this…

Thank you both for your help!
val

1 Like

BPM Queries are not BAQ. They are C#-based. So you have to use valid C# literals.
In the case of boolean fields, they are false and true in lower case.
False and True in Pascal case are VB.NET literals.

2 Likes

Yup, I noticed that a while back when the first time I used a BPM Query, I had to do " " on a string and same with lower case true or false for Boolean. Thanks for confirming that!