In Epicor 9, I had a BAM sent up that sent an email to the buyer when the PO was approved or rejected. It is not compatible in Epicor 10. I have not been able to figure out how to set this up in 10. The buyer’s email (PurAgent.EMailAddress) is not in the POHeader table. This has been a stumbling block for me. I think this probably very simple. Any help on this would be much appreciated.
Frankly, I am surprised that Epicor does not have this set up as a global alert. Buyers need to be notified when their PO is approved or rejected.
Hi, Thanks, It looks like this has custom code, a bit advanced for me without the code.
I thought this would be a very simple directive to write for a novice
I managed to get it done in epicor 9.
Just an FYI - the global alerts in E10 aren’t very reliable.
Below is some (credit to @josecgomez) to grab a single field value from a database table. In your DD you could create a variable, the use a set variable widget with the following expression
Db.PurAgent.Where( r =>r.Company == CurrentCompany && r.PurAgent == Buyer).Select( r =>r.EMailAddress).DefaultIfEmpty("").FirstOrDefault();
You’ll need to tweak the CurrentCompany and the Buyer parts. CurComp should come CallContext.
Buyer shoukd come from the POHeader table.
Yeah, E10 conventions might take some getting used to but once you get thru a couple of these I think you’ll like it.
If you have a test system & want to play around, here is a REALLY simple method directive.
When Approved is toggled on a PO, it pulls email via custom code and displays some details.
I agree with @bordway once you get a few down you will like it. I had a bunch of BAMs in E9 and this is how I converted them. You can reuse the code for most alerts.
This is on a standard data directive.
I set a condition:
Then called an E10 version of a BAM .p program in the custom code.Alert PO Approved.bpm (17.9 KB)
Does anyone happen to know if this works for emailing the approval when there are more than 1 level? IE Buyer needs their approver to approve, then their approver needs to approve?