Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

How the Email History can be deleted which is older than 15 days in D365 F&O

(1) ShareShare
ReportReport
Posted on by 32

Hi all,

Initially while Configuring Email Setup I had mentioned Email retention days 0(Default Setting). Now if I want to check the email History its taking too much time sometime not even loading.

I want to delete all the Email history which are older than 15 days. 

Even after configuring the retention days to 15, the older emails are not getting deleted.

How can I delete the Email history which are older than 15days.

Regards,

Travor

  • Martin Dráb Profile Picture
    Martin Dráb 230,842 Most Valuable Professional on at
    How the Email History can be deleted which is older than 15 days in D365 F&O
    It seems to me that you're deleting batch history related to SysEmailHistoryCleanupBatch, not executing SysEmailHistoryCleanupBatch class.
  • How the Email History can be deleted which is older than 15 days in D365 F&O
    Hi Martin,

    Thanks for replying, and sorry for mixing up SysEmailHistory and SysOutgoingEmailTable.
     
    Anyway, I'm still running on recurrence the SysEmailHistoryCleanupBatch.
    But when checking the SysEmailHistory, no data is being deleted/cleaned. 
     
    What am I doing wrong here?
  • Martin Dráb Profile Picture
    Martin Dráb 230,842 Most Valuable Professional on at
    How the Email History can be deleted which is older than 15 days in D365 F&O
    This thread is about Email history table, which is something that SysEmailHistoryCleanupBatch would help you with. But SysOutgoingEmailData is a different table.
     
    SysEmailHistoryCleanupBatch cleans up SysEmailHistory and SysEmailAttachmentHistory, not SysOutgoingEmailData.
  • How the Email History can be deleted which is older than 15 days in D365 F&O
    Hi all,

    I'm struggling with the same issues.
    When checking my database usage, 50% of the data is consumed by AXDB.SYSOUTGOINGEMAILDATA
     
    I would like to free-up some space, by deleting all data within this table older than 30 days.
    I came across the Batch Job Clean Up with SysEmailHistoryCleanupBatch, and launched it as batchprocessing with a recurrence.

    However, nothing seems to happen: after +/-24 hours, no data seems to be deleted from the Outgoing Email-list.

    Did I forget something, or do something wrong?
    Thanks!
     
  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: How the Email History can be deleted which is older than 15 days in D365 F&O

    Hi Travor,

    I can see one option to delete batch jobs based on days.

    Navigate to System administration >> Periodic tasks >> "Batch job history clean up" or Batch job history clean up (custom).

    I never used these two forms. But you can give it a try on how these two forms are implemented. At first you can try on any dev environment.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: How the Email History can be deleted which is older than 15 days in D365 F&O

    Hi Travor, Not sure about 15 days retention period but you can check this batch job in your environment.

    pastedimage1684205251164v1.png

  • huijij Profile Picture
    huijij 19,811 on at
    RE: How the Email History can be deleted which is older than 15 days in D365 F&O

    Moved to Finance forum.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans