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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

send email when a record is inserted in d365fo

(0) ShareShare
ReportReport
Posted on by 58

Hello All,

I need a code for send email when i insert a record into the table

i have form when i created a new record an email will sent

I tried "sysmailer" class but that class was not shown up and throws error

help me to sort this

thanks

Aathil P

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: send email when a record is inserted in d365fo

    Hi Aathil,

    There is an option to send email without any code needed.

    On the form under options >> Create alert rule - You can select "Record has been created" event to send email when record is created.

    Refer to the below blog for detail explanation.

    https://dynamics-tips.com/how-to-use-alerts-d365-finance-and-operations/

    Thanks,

    Girish S.

  • AXDynamics365 Profile Picture
    58 on at
    RE: send email when a record is inserted in d365fo

    thanks much bro

    But my task is send email via code when a record is created

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: send email when a record is inserted in d365fo

    Okay, check the below blow and see if it helps your case.

    https://dynamicsaxgyan.wordpress.com/2017/04/05/sending-email-using-x-code-ax7-d365-for-operations/

    Thanks,

    Girish S.

  • Verified answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: send email when a record is inserted in d365fo

    Hi Aathil, In addition to Girish suggestion, you can check this article, if you need placeholders as well in mail.

    dynamicsaxinsight.com/.../

  • André Arnaud de Calavon Profile Picture
    300,206 Super User 2025 Season 2 on at
    RE: send email when a record is inserted in d365fo

    Hi Aathil,

    You mentioned the following: "But my task is send email via code when a record is created".  What is the business reason to add coding for something that is already possible out of the box? It would be your duty as an expert to challenge the task when there are alternatives which were now provided to you above. Why maintaining additional coding in the future when this can be avoided? The cost of ownership should be as low as possible for the customers.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 701 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 588 Most Valuable Professional

#3
Sumit Singh Profile Picture

Sumit Singh 544

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans