BPM on Purchase order Detail to create a warning if part revision isn't approved

See attached! Thank you for your help! :slight_smile:

PODTLPartRevnotapproved.bpm (27.1 KB)

@Jennifer You need to give the query the part and rev to lookup.
First assign Part and Rev to variables with Set Argument/Variable
image
You don’t want to check on every update. Only when the Rev changes so add another condition.
image
You could join to the ttPODetail, but that is bad, so we will use the variables Part and Rev to find if the Revision is approved. I also added that Rev was not blank. Not sure if it is needed.
image

image

Ah nice one Greg. I didn’t even get chance to import it into an environment as yet.

@gpayne I’ve never had an issue with joining to tt tables, queries always seem to run quick. Have you had personal experience with poorly performing queries, or just heeding the advice that’s been written in a couple of forum posts? Just intrigued :+1:.

@markdamen I have not either, but when posting publicly I want to not show any possible bad habits. I actually did the joins to tt and tested this and heard a voice about the tt issue and I went back and did it with variables. With a small table just bad form, but with something like PartTran or TranGLC it could be very bad.

I’m going to have to dig out and re-read the post, was it by @timshuwy? Had some comparisons on performance from memory.

1 Like

here is a thread on it

1 Like

HI @gpayne and @markdamen,
First, I want to thank you so much for the guidance and let you know that I appreciate you! You guys rock!

The is warning still generated even if the part revision is approved.
I guess I should have mentioned that the parts have multiple revisions and we only want to trigger the warning if the revision chose is not approved. I’m also not familiar with the variables, so am wondering if i have something set up on the action.

Thanks again!

In Greg’s screenshot he has Approved = true, you want Approved = false I think. Is it currently NOT firing when it should (i.e. the reverse of your desired behaviour)?

Hi Gary,
Thanks for the quick response.
I changed that and it is still firing on both revisions.

I would move to using a Method Directive on the PO.Update method. Use pre-processing, then you have the choice of either a warning or a block.

Use the same template that Greg provided, make sure to use “Set Field/Variable” block once for each variable. I confused you in my previous reply, I spotted that Greg used a check for query rows less than 1 so his TRUE would work.

Again, thanks for the quick response. I tried this on Pre-processing, it still seems it is ignoring the criteria.

@Jennifer The way I posted looks for the rev to be approved and sets the warning if the revision is not approved and MyQuery returns 0. That is why number of rows is less than 1. What is your version you just have E10. I have a 10.2.400 and can send you a working version if you are 10.2.400 or better.

HI Greg,
Using version Kinetic 2021.2.33. If you could send it, that would be fantastic. At this point I’m not sure if it is the version or something I am doing incorreclty.
Thanks so much again!!! :slight_smile:

Had I know that last night I would have sent this instead of doing screenshots.

PODTLPartRevnotapproved v2.bpm (33.8 KB)

1 Like

Thank you so much! I see what I did incorrectly. I had the actions set in reverse! So close.
Again, Thank you so much! :slight_smile:

1 Like

HI @gpayne ,
Thoughts on how to achieve the same but if the revision added to the PO doesn’t exist?
I’ve tried what you gave above, but it isn’t working like I thought it should.
Again, very much appreciated.

I’ll take a look later today. I would have assumed it would return 0 results and fail.

@Jennifer With the DD the only way to make it work was to check on every save. I moved it to only when the revision is changed ChangeDetailRevisionNum post processing since it is just a warning.

PODTLPartRevnotapproved MD.bpm (32.2 KB)

Again! You’re the best!
I’m interested in learning more about this, what is your recommendation for learning more?

Download the Ice tools for you version from EpicWeb to get some samples to work thru. Depending on which UI/UX you are using learn how to trace, so you can see what Epicor is doing so you know what methods to get in before or after.