User warning when part number is changed to a bad part number

I have a BPM that fires a warning when a user enters a bad part number into a sales order. The problem I’m trying to fix though is when a part number gets changed from a valid part to an invalid part, nothing happens. I was testing this last week and showed my coworkers both examples working. When I went to roll it in to live, the changing part numbers no longer fired a warning. I’m attaching screenshots. I assumed the rowmod updated criteria is what triggered the “changed” part number, but it must not be.

Any help is greatly appreciated




BPM-BAQ

Yeah, RowMod values can be “interesting”…

When I’m not sure if RowMod is being populated/by what
I start with a simple BPM

  • no criteria
  • and a messagebox to display the RowMod and any other related fields.

How do I pass the RowMod value? Through a scalar variable?

Sorry, I’ve only done super simple bpm’s.

I found the value

added = ‘A’ and updated = ‘U’

Do I need to change the icerow.RowState value to ‘A’ and ‘U’ then?

Might you also want to add a BPM on SalesOrder,ChangePartNum (or SalesOrder.ChangePartNumMaster)?

@Ernie is right. Add it on ChangePartNumMaster. Also change the condition OrderDtl.PartNum changed from any to any or Added OrderDtl which covers both new line and modified line.

@Ernie is correct, remember to use your traces and you can see for yourself what methods are called and when. I would actually remove the BPM from update (it’s already slow enough) and move it to the ChangePartNumMaster method only. I believe that fires even if it’s a new row, it’s just an onvalidate method.

I’m giving it a shot right now.

Not sure on the condition though any to any or added. I don’t see any option that would give me that. I use changed from any to other though.

But beware… from @timshuwy

ONE PROBLEM… the “ChangePartNumMaster” is not always run by all processes that can create a sales order. For example, if you import quotes, it is not run. I have found that in some cases, you must have the same logic in multiple places in order to get it to run… Current customer I am working with adds sales order lines through Epicor Commerce Connect, EDI, Quote Conversion, and manual order entry (plus an automated interface). Each process may or may not use the ChangePartNumMaster BO, and we had to test each one separately, to determine that all of them ran. I know that in one case, we simply chose to not use this BO, and move all the logic to a Data BPM.

1 Like

I can’t get the warning to fire using the ChangePartNumMaster BO. I have the condition set to when ttorderdtl.partnum has been changed from any to another.

If you are using change part num master it can be assumed it was changed any to another. just take the part num arg coming in and do your validation look up on it.

Add condition on Added OrderDtl as well.

OK, so I’ve gone through testing with only the prompt and thought I had it. However in implementing it, I noticed the part number it’s using is existing part number not the changed part number.

example

enter 3360001 (valid part) on a new line and I get the popup and the part numbers “variable” in the message is blank.
change the part to 3360001TEST (invalid part) and i get no popup and the cursor moves to description
change the part back to 3360001 and I get the popup saying 3360001TEST is an invalid part.

When creating the “variable” for the message I used the changed and added check boxes for the ttorderdtl.partnum field. What did I do wrong here and how can I get it use the new part number instead of the exisitng part number when running the BPM? Thanks!