web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Conditional Notification.

(0) ShareShare
ReportReport
Posted on by

Hi, all!

I am little new to AX and not familiar with the coding in AX!

I have to make a notification system which is like

if the value in one table gets lower or higher than the value in another table,

it automatically sends a notification alert to a custom made group of users.

please help me with the code.

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Christian Silva Profile Picture
    707 on at

    Good day Hassan,

    I recommend studying another approach with your client, but if there is no other option I would try to create an event on Write() of both tables to make this validation and if it returns true the system will create a notification through code to a group of users.

    You can check these links to setup group of users and create notification through code:

    https://technet.microsoft.com/en-us/library/aa548611(v=ax.50).aspx
    https://community.dynamics.com/ax/b/axaptavsme/archive/2012/11/08/create-alert-using-x-codes

    Be aware that depending on the frequency of updates and number of users using both tables, false positives and performance problems might occur. Talking with your client or a consultant to find a balance between what is best for him and best for Dynamics AX is still the best solution.

  • Community Member Profile Picture
    on at

    christian thanks for the reply !

    the thing made me write this post is i am not getting how to make the validation between two tables so the notificaiton can proceed.. what should i do on both the tables? what code and where should use ??

  • Christian Silva Profile Picture
    707 on at

    On every table there is a method Write() which is used for every Insert, Update or Delete.

    You should create a postWrite() to do the validation using Events( more details on: amazingax.wordpress.com/.../microsoft-dynamics-ax-2012simple-use-of-eventing-frameworkpart-1use-of-coded-events).

    You already have the table buffer then all you have to do is SELECT to return records if the value from Table A is higher/lower than table B.

    You can find some examples on MSDN: msdn.microsoft.com/.../aa848113.aspx

  • Community Member Profile Picture
    on at

    Christian m really grateful to u for your help.but as i mentioned before i am new to ax and not familiar with the coding in ax. if u can make it out to show me step by step procedure to my requirement

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans