Send Email on Menu Item Open

,

So I wanted an email sent when certain menu items are opened as an alert, saying what it is and who the user is. Basically only for some of the more sensitive financial stuff. Basically I wanted to be more proactive about auditing and alerting than just a change log.
I looked around a bit and didn’t see any documentation pointing me in the direction. I have done data directives to do this on field changes and such before. I would also be open to email alerts when reports are ran as well. Thanks.

SaaS MT Cloud, 10.2.600.9 if that helps.

Are you having concerns about your menu security setup?
I know I find the security reports a little hard to decipher sometimes.
When in doubt, I copy live to a test system, reset user passwords and start logging on as each user and testing menus. Can be very tedious but… it’s nice to finally reach a level of comfort with security settings.

You might try sending an email from a form customization too.
So you’d even be able to catch Form(s) loading?
Here is a thread with example code

For BPM - you might be able to use callContextClient.ProcessID as one of your conditions.

  • I sometimes have used this to specify valid menu item(s)
    image

or maybe check out some of the examples of BPMs being triggered from Task Agent?

2 Likes

Thanks for the answer. I appreciate the help. I will try the callContextClient idea first.

There were concerns over security as far as even the security manager having some level of auditing. For example, the security manager is typically not (in my case anyway) a finance person. But they still have access to those menu items with the exception of payroll. So I wanted a way to send an alert to the owner whenever a use who is not the owner or accountant open up a finance report or form.

If the user is Sec Manager and they know about customizations, They would easily be able to open the base form, bypassing any code in a customization that causes the email being sent.

edit:

a BPM on one of the BO calls that happen the specific form loads, is your best bet.

For example, AP Invoice Entry first calls APInvoice.EnableAPDates. So a Post Proc BPM on that could send an email that would include the userid.

I am aware of that, and unfortunately there is not a great way to do this that cannot be bypassed due to there not being a lot of granularity to the security of the security manager. Having said that, I wanted a solution where someone would have to go out of their way to do this. Such as turning off bpms, menu security, or customizations.

Fairly easy. But requires doing it for every form. If you’re lucky some forms may call the same BO methods, so that BPM would fire on those as well.

and the email widget like:

image

A potential downside is that when other forms or processes call the BO, it will fire. Not sure how to limit it to a specific form calling it.

Ok that’s pretty decent, thank you for the help. I put in an ideas ticket with Epicor to allow for something like payroll manager, but for all of finance. I assume it is unlikely to be done soon, if at all.