good to know mate,
could you elaborate on this ?
good to know mate,
could you elaborate on this ?
Sure. What I accomplished with summing “OurQty” was the orange column from my first post. That’s actually not useful itself to add the raw numbers in 3 different UOMs. What I need is the sum of the blue column. But - that does not exist. “This Transaction Qty” is not a real field in RcvDtl. So… looks like I will need to get creative.
Any thoughts?
if ThisTransactionQty is not a database value then it is for sure ttThisTransactionQty within this data set, so use it straight a way to do your comparison, i have done something similar with Quote Break Qty Cost values.
Ooh, interesting. That raises some questions, though.
So, this compiles (or whatever) but returns zero (in sum, anyway).
Just to clarify here, this is not itself a BPM. It’s an Epicor Function, and I am testing it in hopes of using it in a Data Directive (BPM).
So perhaps that is why I get zero, because I am not transacting?
But I don’t think I buy that, because I am indeed invoking the BO. And Receipt Tracker, for example, shows This Transaction Qty and it is certainly not mid-transaction.
@A.Baeisa Let me do some tracing and see if I can figure why I get zero, before I bother you much more. Also, it’s about quitting time in the UK, no?
Alright, I think we got it!
So, I had been using the BO of RcvDtlSearch
(seemed like it would be less bloated), but in fact I needed Receipt
instead, in order to get that “transaction” quantity.
Still more work to do, but huzzah! Go @A.Baeisa !
To reiterate, this code did work just fine if you use the right BO:
By the way,
vs.
Well, it gets it done, at least.
one note… when creating a BPM to monitor this, remember that there are two ways to create a receipt line…
These two methods call two different business objects, and therefore, your BPM needs to run two different ways. This might be a time to consider creating a FUNCTION, and then call the function from both BPMs to reduce the amount of code.
And here begins the wild task of trying to build a BPM to stop something. I forget what it was, maybe something on order entry, where they asked to stop the action of adding a line or something related to adding an order line… It became a huge task to try and record all the different ways to create an order line and then have to trace them all and build the bpm to stop each bo method.
Yup… from order entry, you can retrieve a quote line, you can duplicate an order, you can manually enter a line… from Quotes, you can push the entire quote. ECC can also create quotes. I am sure that there are others. in the end, you must trap each one separately because they each use a differing business object. Before Epicor functions, you had to duplicate the code over and over again… but now, you could create one function that you pass data to for any validation, and then have the separate BPMs handle the calling of the function.
Still, you have to call the function from all the separate bo methods. Great that you can re-use the same code though! I love functions!
sorry @JasonMcD, yes i finish 4:00pm UK time, i am back now so good morning , i am going through your messages / posts now
ok, now the tt table will hold the value of any -on the fly- field which in transaction i.e. row status A or U, but the problem you will face that you need this value for the other recept lines to do your comparison i.e. from the lines that not in transaction i.e. Database thereby this value does not exist for those lines, am i correct ?
No, actually it does, thankfully. It’s there is receipt tracker, so I did the trace on it and saw it used the Receipt
BO, and so I used that, too.
so problem solved ?
@A.Baeisa Well, this leg of it is resolved, definitely, thanks to you.
Now I’m on to the check against ordered quantity (is tran qty > ordered qty), and is this a delete or are they modifying an existing receipt or is it a new receipt, etc. Normal problems. I’ll keep updating as I progress.
Ta da!
All done, and I enabled it this morning. Now I wait for the screams.
Seriously, though, this is beta for sure. I have tested it, but my users will find out if I missed anything.
Here are the files.
OverRec_generic.bpm (36.0 KB)
Receiving.efxb (263.1 KB)
(“Generic” is because in the text of the error message I edited out my company name and “ask Jason” at the end because that would be weird at your company…)
Again, I just want to say how awesome this is to be able to throw an error from a Data Directive but have a clean way to do the calculations in a Function (or two) - since most of the info I need is not in the Data Directive natively (because it comes from other tables).
Thank you again to @A.Baeisa for the technical help on summing a field in a one-line statement; that was critical to this project.
For any Yan Can Cook fans out there, “If Jason can code, so can you!”
great work mate, well done you have done it all and many thanks for sharing it.
Can i know if we dont need to count the POBaseUOM ,how can change in this BPM / Library?
I get this error when i import your bpm & library.
This receipt: 2.0000 PCS
PO qty (ordered): 0.45833340 PCS
Received so far (other than this receipt line): 0.0000 PCS
Is becasuse we have Track Mutil UOM ?
Oh man, to be honest, I have no idea. We don’t have multiple UOMs.
So you are saying this does not work for you at all?