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 :
Small and medium business | Business Central, N...
Suggested answer

Email Body for a custom report in Business Central

(0) ShareShare
ReportReport
Posted on by 833

I have created a custom (.RDL) report in SQL Server Report Builder and an AL extension that emails this report as a PDF attachment from an action on a custom page & table in Business Central. This is working fine. My question is about the email body text. At the moment I have hardcoded a few sentences (e.g.) 'Please see attached document etc...' in the codeunit in the extension. Ideally I would like the users to be able to edit the email body text as and when needed in BC without me having to change the extension. Is there a way that an email body can be saved in Business Central for user editing? And can that email body be loaded programmatically by a codeunit prior to sending the email?

I have the same question (0)
  • Suggested answer
    MahGah Profile Picture
    15,527 on at
    RE: Email Body for a custom report in Business Central

    Hi

    I hope the following post help

    https://yzhums.com/7485/

    https://yzhums.com/1799/

  • Nick Webb Profile Picture
    833 on at
    RE: Email Body for a custom report in Business Central

    Thanks for your response. Interesting info about: Codeunit ‘SMTP Mail’ is marked for removal.

    However, neither link answers my questions below:-

    Is there a way that an email body can be saved in Business Central for user editing? And can that email body be loaded programmatically by a codeunit prior to sending the email?

  • Suggested answer
    Steven Renders Profile Picture
    5,668 Moderator on at
    RE: Email Body for a custom report in Business Central

    To my knowledge only WORD layouts can be used in the email body, RDLC layouts are not supported. (Why I have no idea...)

    Set up email in Business Central (contains video) - Business Central | Microsoft Docs

    Technically there are several ways to 'change' behavior and customize what needs to happen:

    ALAppExtensions/Modules/System/Email at main · microsoft/ALAppExtensions · GitHub

    ALAppExtensions/Modules/System/Word Templates at main · microsoft/ALAppExtensions · GitHub

    ALAppExtensions/Other/EmailAddressLookupDemo at main · microsoft/ALAppExtensions · GitHub

    Issues · microsoft/ALAppExtensions · GitHub

    and you might also want to checkout these objects:

    Table 2118 O365 Email Setup
    Table 2170 O365 Default Email Message
    Table 5935 Service Email Queue
    Table 9500 Email Item
    Table 9501 Email Attachment
    Table 9510 Email Parameter
    Page 1805 Email Setup Wizard
    Page 1811 Setup Email Logging
    Page 2126 O365 Email CC Listpart
    Page 2127 O365 Email BCC Listpart
    Page 2128 O365 Email CC and BCC Settings
    Page 2135 O365 Email Account Settings
    Page 2149 O365 Email CC/BCC Card
    Page 2150 O365 Sales Email Dialog
    Page 2159 O365 Email Preview
    Page 2170 O365 Default Invoice Email Msg
    Page 2171 O365 Default Quote Email Msg
    Page 2197 O365 Email Setup Wizard
    Page 2328 BC O365 Email Settings Part
    Page 2329 BC O365 Email Settings
    Page 2335 BC O365 Email Account Settings
    Page 2370 BC O365 Default Email Messages
    Page 2397 BC O365 Email Setup Wizard
    Page 2823 Native - Email Preview
    Page 2842 Native - Email Setting
    Page 5961 Service Email Queue
    Page 9700 Email Dialog
    Report 1320 Notification Email
    Report 5084 Email Merge
    Report 6006 Delete Service Email Queue
    Codeunit 89 Sales-Post + Email
    Codeunit 1641 Setup Email Logging
    Codeunit 1655 Office Add-In Sample Emails
    Codeunit 2129 O365 Export Invoices + Email
    Codeunit 2135 O365 Setup Email
    Codeunit 2151 O365 Sales Email Management
    Codeunit 2380 O365 Email Customer Data
    Codeunit 5064 Email Logging Dispatcher
    Codeunit 5065 Email Logging Context Adapter
    Codeunit 5915 Customer-Notify by Email
    Codeunit 5917 Process Service Email Queue
    Codeunit 8891 Email Scenario Mapping
    Codeunit 8895 Email Feature
    Codeunit 8898 Map Email Source
    Enum 9510 Email Parameter Type
    EnumExtension 8891 Base Email Scenario

  • Suggested answer
    MahGah Profile Picture
    15,527 on at
    RE: Email Body for a custom report in Business Central

    Hi

    I believe Steven provided a guideline for your question. 

    As he mentioned you only can use Word Report. But editing word layout also require extra work for users. We had a similar need but for different purposes (SO confirmation related). What we did is we created a new page in BC and then defined Code / Description. Then in email page we let user to select a code. Then in report we used description of code. This way user can go to new page and define new code with needed description which will be populated to report if code selected. In addition, we added the Code to SO if we want to use batch email. 

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,308

#2
Sumit Singh Profile Picture

Sumit Singh 2,798

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,793

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans