Open Forum

Expand all | Collapse all

Send email using AL extension

  • 1.  Send email using AL extension

    Posted Mar 13, 2019 12:30 AM
    I'm a software engineer writing an extension for Business Central online. So far, I have added a workflow event which triggers when the status field of my custom table is changed. I'm now trying to make a workflow response which will send a notification email to a list of predefined email addresses. Are there any good tutorials for this? I haven't been able to find any. SMTP on our tenant has already been set up and tested.

    ------------------------------
    Jessica Robertson
    ------------------------------


  • 2.  RE: Send email using AL extension

    TOP CONTRIBUTOR
    Posted Mar 14, 2019 08:15 AM
    It sounds like you're on the right path.
    Here are the key tables you'll need when doing stuff like this:
    • Workflow Event
    • Workflow Response
    • WF Event/Response Combination
    • WF Table Relation (1505)
    I usually refer to this walkthrough: https://docs.microsoft.com/en-us/dynamics-nav/walkthrough--implementing-new-workflow-events-and-responses
    Also @Juan Crispin shares some great code that might be useful in this post: https://www.navug.com/communities/community-home/digestviewer/viewthread?GroupId=49&MID=10611&CommunityKey=95503735-5a0b-4af1-8326-9bd7bb3b4d3d&tab=digestviewer
    Or perhaps what you're missing is simply in Codeunit 400 "SMTP Mail"?

    ------------------------------
    Greg Enns
    ERP Coordinator
    Technical Prospects
    Kaukauna WI
    ------------------------------



  • 3.  RE: Send email using AL extension

    Posted Mar 14, 2019 07:22 PM
    Thanks, the SMTP Mail codeunit was what I was looking for.

    ------------------------------
    Jessica Robertson
    Taska Prosthetics
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role