Refusing a lot number entry if it's a duplicate

I’m trying to create a BPM to refuse duplicate receipts against the same lot number.
I want it to raise a message if the lot number already exists against the part, but not if creating a new lot.

I’ve tried both data directive and method directive BPM’s to no avail. I’ve been structuring my BPM as shown below (Example is data directive then using a function to display the pop up message).

The BPM seems to fire no matter what the lot number entered is.
When amending this BPM for method directive after tracing, it allows the lot to be entered, then once saved fires the message on edit.

Can anyone help a BPM newbie out? I may be barking completely up the wrong tree which is my worry!

This should be a method directive, what method are you hanging this on? Is it pre-processing or post-processing?

Also what is the relationship you are creating between ttPartLot and Erp.PartLot

Secondly on this widget you are using you should not be joining ttPartLot to any Db context since the join happens in memory and it will retrieve every single PartLot record in your system

1 Like

Thanks for the response Jose,

I’m using the Receipt.CheckDtlLotInfo method.
I’ve amended the Query to look like this, triggering the message if number of rows is above 0.