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

Media Field attach as Email Body or as an attachment

(1) ShareShare
ReportReport
Posted on by 7
Hi All,
I have a created a field of type media in my table and have imported an image in that. Now I want that image to be added to my email Body if possible and if not then i want that to be attached to my email attachment as a separate attachment. Please help me if this is possible in Business Central.
I have the same question (0)
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at
    Hi,
    You can attach the image from your media field as an email attachment. Check out this link for code examples on sending emails with attachments.. https://businesscentralgeek.com/5-ways-to-send-an-email-in-business-central take a look at the example where a report is attached to the email.
    Hope that helps!
  • Suggested answer
    Aakib khan Profile Picture
    128 on at
    //Below code is for making the media or image type of business central into email 
     
    tempblob : codeunit tempblob;
    logo : outstream;
    BULogo : instream;  
     
    tempblob.CreateOutStream(logo);
     
    //To export the media image to an outstream
    //evibusunit.Picture is a field of media type
    evibusunit.Picture.ExportStream(logo);
     
    //Convert it into instream for making it into email body
    tempblob.CreateInStream(BUlogo);
    emailmessage.Create(recipient, Subject, body, true);
    emailmessage.AddAttachment('Logo.png', 'PNG', BUlogo);
    email.Send(emailmessage);
     
    //Now business central image will appear into the email
     
  • Suggested answer
    Valentin Castravet Profile Picture
    32,689 Super User 2026 Season 1 on at

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 April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,003 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,225 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,192

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans