I am new to BPMs and we are still in the implementation period so bear with me please!
I am trying to create a pre-process method directive that makes a field on orderdtl required when the partnumber on that line has a specific field checked. I guess my issue is I can’t figure out how to make the condition based on information in a different but linked dataview. Can anyone provide me with some direction? Thanks!
Hi
Without a bit more granular detail I cannot provide exact instructions, but at a high level:
In the BPM condition you can use:
There is at least one added row to OrderDtl
The “number of rows in the designed query …” and then create a link from the ds/ttOrderDtl table to the Part table and then put a condition in there where Part.FieldName = true
Then if the field on order detail is not selected throw an error
Then i
I have a boolean UD field on part table called ReqSN_c. When that is marked true I want the UD string field SerialRef_c on the OrderDtl to be a required field before they can save that line.
Sue’s instructions were pretty much spot-on. A couple modifications:
The condition should be if the SerialRef_c field of the added row is (empty string) OR the SerialRef_c field has changed from any to (empty string). That second condition you want in case they remove the SerialRef_c field - you want to check the part.
If the first condition is true, then add another condition with the BAQ widget. The condition is if the BAQ returns at least one row, and the query links the dsOrderDtl to the Part table where ReqSN_c is true. If that’s returns one record, it means the part requires a SN. .
If second condition is also true, toss up an exception.
Thank you! Connecting the part table and orderdtl table was what I was struggling with. I mapped it out per your directions, and I still am having some issues though.
Everything checks out but then it doesn’t actually throw up the exception. Should the directive be on the Update, GetRows, or GetNewOrderDtl method? That’s the only thing I can think of that is making it not work. I tried the tracing tool and it’s not giving me back any information.
Lastly, is there a reason you suggest having the first condition be on the status of the serialRef field instead of when partnum is added or changes? Just trying to understand for future applications.
If it’s an OrderDtl field that you’re trying to require, I’d probably put it on MasterUpdate. Something along the lines of:
IF: there is a new row or a changed row where the partnum has changed
AND: the new partnum has <your field> check on the Part table
AND: the <conditionally required field> is blank
I’d be more inclined to put it on the onchangepartnum (I think it’s called). That way when you enter the partnum on the line and tab off it will do the check the rather than waiting to check on the save.
Another tip if I am not familiar with the methods I’m working with I work with the trace and creat some test bpms that just generates a message, enter data into epicor until I find the exact step in the process that fires it.
The thing about that is you have to pass a value that blocks Update or MasterUpdate if the field is empty. If you want to set a value or throw a message, I agree, but to block the empty field from saving, I’d put it on the update/MasterUpdate.
I thought about that too. The problem is that method kicks off on entering the PartNum, which is the first thing they do, before they would enter the other data. So, the other data would be empty most of the time at the point they enter the PartNum, leading to the message popping up nearly 100% of the time. I’d go with the Update method, because by that time it’s given them the chance to put in the other required data.