Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

How to automatically delete the attached documents when an email is sent.

Posted on by 1,632

Hi All,

To reserve and reduce the space in Business Central. We want to delete all the files present in the Attached Documents section and would like this to happen automatically when an email sends.

For example, if there are 3 files attached with a record and when we send an email attaching multiple files, we want to delete those 3 attachments from the Business Central when the email is sent.

Can anyone please help us how we can achieve it?

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,137 on at
    RE: How to automatically delete the attached documents when an email is sent.

    Email Message Attachment (8904) Is where the data is stored. Quickest option would be to have a processing only report do DELETEALL for that table. You can add it on the job queue to run every night. Day time you might actually want users to validate an attachment was sent for emails sent on that day.

    from what I can see there aren’t any obvious events for when an attachment hits this table: github.com/.../src

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: How to automatically delete the attached documents when an email is sent.

    Hello,

    Interested to hear about possible extension that can help you to achieve this as this does not seem to be available in standard.

    If there is no further response from community, then you may want to consider raising this as a suggestion via https://aka.ms/bcideas .

    Thanks.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans