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
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.
Hi Aathil, In addition to Girish suggestion, you can check this article, if you need placeholders as well in mail.
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.
thanks much bro
But my task is send email via code when a record is created
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.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156