I am in need of help creating a BPM. Something I’m doing is not working correctly, so if someone can walk me through this, I would really appreciate it.
I’m looking to create a Data Directive that closes PO lines when they are received at a 95% threshold. We currently have the POs closing upon invoice because the entire PO was closing when we had it set to close upon receipt.
The issue we are running into is that there is sometimes a gap between when we receive the item and when the invoicing happens, so it messes up the MRP. If there is a way to do this without it being a Data Directive, feel free to tell me that too!
Here are the steps I’m taking right now:
I created a Standard Data Directive in the PORel table.
Design mode looks like this:
Start has the variable getOrderRelease
Set Argument/Variable sets this variable to false
Condition is receivedqty of the updated row is more or equal to relqty * 0.95
Update table is where I think the biggest issue is…
Any help is much appreciated.
I believe the first thing you need to understand is how Epicor works with data.
This image does a very good job of showing it. As you can see in the image, the Standard Data Directive happens AFTER data is saved to the DB. So, all you are doing is changing the data in the DB and the system has no idea that that data changed. In order for the system to know it has changed, and run the appropriate method calls, you will need to make this change somewhere else.
Have you ever run a trace? I recommend doing a trace on a receipt and see what methods are triggering when a receipt is received complete.
Thank you so much for this image! That definitely helped me get off to a better start!
My issue I’m running into now is that I’m struggling creating a directive that links the PODetail table to the PORel table. I figured out how to change the OpenRelease column in the PORel table, but that doesn’t close the line itself. I’m looking to close the line, but since these options are in different tables, I’m not sure how to use a data directive to get this to work.
Maybe a dashboard to display PO lines that have had >= 95% of their quantity received for review would be better?
Doing this programmatically could cause issues if you are receiving a PO, a receipt transaction takes the total received for that line above 95%, but you then still have more to receive.
Not sure what your workflow is like but that situation could potentially happen multiple times a day here.
I am not sure what your set-up is there but, if we were to do this in our system, Accounts will be absolutely pissed off as the remaining quantities will go to the variance accounts and they will have to do journals to correct it.
Anyway, I would go with @hackaphreaka suggestion and use a dashboard to identify lines and close them manually.
If you still want to try the BPM, I would start with Receipt.Update.Pre method directive with first condition like Received has been changed from any to true. If that doesn’t work, try data directives.