I was looking into setting up an automated email that would fire a week before a PO due date comes up, I am looking at the bpm which fires after something is done with the PO, but obviously the PO will be written well in advance of the purchase date coming up. Is there any way to schedule an email to be sent in the future using BPMs? Or is there some other solution I am not thinking about? Any advice is appreciated!
There are several ways to do this. You could schedule a function to run daily to look for any PO that meets your criteria and have the function send an email. Can also schedule a BAQ to run daily with a BPM on the BAQ and have that send an email.
This sounds like a great idea, I am gonna go down the route of running a daily BAQ, however how do I have a BAQ run a BPM? I know how to do it the other way around, but for a BAQ to run a BPM is there a specific method directive I can use that is called whenever a BAQ runs? I figure I can schedule the BAQ by scheduling a BAQ report as well but please correct me if I am wrong.
Add your BAQ as a Post-Processing under the GetList method. You can then add a email step in the BPM designer. You can split the email per PO or send as a batch. Depends what you’re trying to do.
I would do it in a function today if I was doing it. But, there is more than one way to skin a cat. If someone isn’t as comfortable with writing a function the BAQ method works.
Given Epicor’s behavior as of late, I would be very cautious about recommending legacy workaround solutions to problems. Get comfortable with the path that’s still being actively supported.
Here’s a thread I followed to pull this off (using a function):
I schedule my function to run every morning at 7AM, it runs a BAQ which results in sales & invoice figures from the previous day, as well as summing monthly and fiscal totals… then formats an email and emails it out.
What about just creating a BAQ that looks out 1 week on PO due dates and then is setup to email via a Report Style with an SSRS report. Can set a schedule for it? We do this for a lot of reports that email about daily/weekly. No BPM needed.
To be honest a function was my first thought as well, but I am on multitenant still due to some bad business decisions I have been working to untangle so I don’t have access to make a function. I am assuming that is why, but I can’t even open the function maintenance screen, and my user account has all the permissions I am allowed to give myself so yeah
Epicor said they were never getting rid of on-prem.
Point remains that UBAQ is a hack from the time before Functions. Now that we have a purpose-built solution for issues like this, that’s what should be recommended. If people aren’t comfortable using it, they need to get comfortable. It’s malpractice not to be current.
Well.. its not like they ever break everyone stuff… Just a little UI migration and a little linux container migration..
The real reason is they don’t need to break UBAQ’s to achieve whatever goals the VC people have set. If they needed to, they would regardless of how much broke..
Hey David, so I was thinking about this response and even though I am doing this with updatable BAQs, I need to send multiple emails to every supplier in our system that has a PO due in the next 10 days. So if I make something that checks a BAQ every morning, can I send multiple emails out? I am imagining something like this but in epicor non code speak:
{
For each PO in POheader{
If PoHeader.DueDate = currentdate +10{
Send email
}
}
}
So I was thinking I can have a BAQ that only gets POs who have a due date 10 days after the current date, wouldnt I be sending just one email out to one supplier? How do I get multiple emails to fire for each record that meets the conditions I am asking for?
Can do exactly that with a regular BAQ. Then email based on SSRS report style with a Break by Supplier or by Supplier & PO#. This is assuming you have advanced print routing. Then again, i’m terrible with updated BAQ’s so i use this ‘work around’.