Adding User ID to Alert emails

  • Adding User ID to Alert emails

    Posted by DSC Communities on March 13, 2018 at 3:03 pm
    • Rudy Salcedo

      Member

      March 13, 2018 at 3:03 PM

      ?We had an issue recently that was caused by a user who deleted a record from a customized table (probably accidentally).Ā  Eventually we’ll lock down that table so only users with a specific security role can delete records from the table.Ā  In the meantime I’ve setup an Alert rule on the table so that our Credit Manager willĀ receive an email if a record is deleted from that table again.

      When setting up Alert rules, there doesn’t seem to be a whole lot of flexibility or options.Ā  Is there any way that the user id of the person who triggered the Alert (in this case, the user who deleted the record) can be added to the Alert email or pop-up Alert message?

      ——————————
      Rudy Salcedo
      Senior Programmer/Analyst
      LaForce, Inc
      Green Bay WI
      ——————————

    • Ed Tarnovsky

      Member

      March 19, 2018 at 6:44 PM

      Hi,

      There is no way to do it out of the box, but you can achieve that with several modifications.

      AX stores the UserId of the user who triggered the alert in CreatedBy field of EventCUD table. You can get this value in “processRuleDelete” method of EventProcessorCUD class and pass it to “executeActions” method and then to “execute” method of EventActionAlert class where it can be used to format a message.

      ——————————
      Thank you,

      Ed Tarnovsky
      Chief Technology Officer
      Dynamics Resources inc.
      http://www.dynamics-resources.com
      Mobile: (773) 551-0151
      ——————————
      ——————————————-

    • Rudy Salcedo

      Member

      March 20, 2018 at 10:32 AM

      ?Thanks Ed!Ā  Instead of making those modifications, for now we might set up Database Logging on that specific table for Inserts, Deletes, & Updates.Ā  There are only 3 records in the table and nobodyĀ should be adding, changing, or deleting records.Ā  So there shouldn’t be a significant impact on performance if we set up DB logging on the table.

      ——————————
      Rudy Salcedo
      Senior Programmer/Analyst
      LaForce, Inc
      Green Bay WI
      ——————————
      ——————————————-

    • Ankit Modi

      Member

      March 21, 2018 at 4:49 AM

      Hi,

      Database logging will surely help to track adding/edit/delete actions on table. But it will not stopping user to do so. You can control such action by creating and assigning specific custom roles.

      ——————————
      Ankit Modi
      Project Manager – AX/D365FO
      Indusa Infotech Services Pvt Ltd.
      Ahmedabad
      ——————————
      ——————————————-

    • Rudy Salcedo

      Member

      March 21, 2018 at 9:50 AM

      ?Thanks Ankit, we plan to control the ability to add/change/delete via a custom security privilege/role.Ā Ā  Since we have other issues & projects that are currentlyĀ higher priorities, for now we just want to be alerted if/when a record is deleted from that table again, and to find out which user deleted it.

      ——————————
      Rudy Salcedo
      Senior Programmer/Analyst
      LaForce, Inc
      Green Bay WI
      ——————————
      ——————————————-

    DSC Communities replied 7 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Adding User ID to Alert emails’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!