web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Email retention policy

(4) ShareShare
ReportReport
Posted on by 15
Hi Folks,
 
We are facing database capacity issues with activity pointer, we found out that email data is huge, we tried creating retention policy on activity table directly but we got this error: "Direct retention request is not supported for the table" however, we want to retain our email activities in long-term retention, and we were able to create retention policy on it. However, while we were deploying, we got this error: "email: Entity is not available for archival."
 
As per the error message and in microsoft documentation, it seems that it doesn't allow system tables (activity table) for archival.
 
Now first of all, is this true, and I've alternative approach to store description/attachment in blob, and link it with the email/activity table. However, I would like to know if there is any better way to do it. 
 
Categories:
I have the same question (0)
  • Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello GR-16010658-0,
     
    You've hit on a significant and often misunderstood point about Dataverse long-term retention policies and system tables like ActivityPointer (which includes email activities). Let's clarify and explore your options.
     
    Understanding the Limitations:
    • System Table Restrictions:
      • As you've discovered, Microsoft's documentation and the error messages you're receiving confirm that direct retention policies on system tables, including ActivityPointer, are not supported.
      • This is a fundamental limitation of the Dataverse long-term retention feature.
      • The ActivityPointer table, being a core system table that manages various activity types (emails, appointments, tasks, etc.), is treated differently than custom or standard user-created tables.
    • Email Entity Archival:
      • The "email: Entity is not available for archival" error also reinforces that the Email entity, which is a specific activity type within ActivityPointer, is not eligible for archival via the standard retention policies.
     
    Why the Limitations?
    • System Table Dependencies: System tables are often tightly coupled with core Dataverse functionality. Archiving them directly could lead to data integrity issues or application instability.
    • Performance Considerations: Archiving large volumes of data from system tables could have a significant performance impact on the Dataverse platform.
    • Data Consistency: The ActivityPointer table is used to track related activities across various entities. Archiving it could disrupt these relationships.
     
    Alternative Approaches:
    1. Blob Storage for Email Content (Your Proposed Approach):
      • How it Works:
        • Extract the email description/body and attachments.
        • Store them in Azure Blob Storage.
        • Replace the email description and attachment data in Dataverse with links to the Blob Storage location.
      • Pros:
        • Reduces Dataverse storage consumption.
        • Provides a scalable and cost-effective solution for large email content.
      • Cons:
        • Requires custom development (plugins, Power Automate flows).
        • Adds complexity to data retrieval.
        • You'll need to manage the Blob Storage lifecycle.
        • You'll need to maintain the link between dataverse and blob storage.
      • Implementation Considerations:
        • Plugin/Flow Trigger: Trigger on email creation or update.
        • Blob Storage Structure: Define a logical structure for storing email content in Blob Storage.
        • Link Storage: Store the Blob Storage URL in a custom field on the ActivityPointer or Email entity.
        • Data Retrieval: Implement logic to retrieve email content from Blob Storage when needed.
    2. Summary/Metadata Approach:
      • How it Works:
        • Instead of storing the entire email content, store only essential metadata (sender, recipient, subject, date, etc.) in Dataverse.
        • Move the full email content to an external system (e.g., a dedicated email archiving solution).
      • Pros:
        • Reduces Dataverse storage footprint.
        • Preserves essential email metadata for reporting and searching.
      • Cons:
        • Requires integration with an external email archiving system.
        • Users will need to access the external system to view full email content.
        • You will need to maintain the link between dataverse and the external system.
    3. Dataverse Long-Term Retention with Summary Records:
      • How it Works:
        • Create a custom table to store summary records of the emails.
        • Copy essential email data to the summary records (sender, recipient, subject, date, etc.).
        • Enable long-term retention on the custom summary table.
      • Pros:
        • Allows you to use Dataverse's long-term retention capabilities.
        • Preserves essential email data within Dataverse.
      • Cons:
        • Requires custom development to create and populate summary records.
        • Does not archive the full email content.
     
    Recommendations:
    • Blob Storage (Most Flexible): Blob Storage offers the most flexibility for managing large email content.
    • Prioritize Metadata: If full email content is not essential, focus on storing metadata.
    • Evaluate External Archiving: If you have compliance or regulatory requirements, consider a dedicated email archiving solution.
    • Testing: Thoroughly test any solution in a non-production environment.
     
    Key Takeaways:
    • Direct retention policies on system tables are not supported.
    • Blob Storage provides a viable solution for managing email content.
    • Carefully consider your data retention requirements and choose the most appropriate approach.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • GR-16010658-0 Profile Picture
    15 on at
    Thanks Daivat for the elaborate options.
     
    We are exploring second option and it seems like right now, the "description" and "safe description" under email and activitypointer table and "body" under activitymimeattachment, based on my analysis , we can follow below steps:
    1.  As there is a seperate record for each message, we can create a query to get all old records except the latest.
           Filter criteria could be group by regarding, sort by created on and maybe include subject in the mix.
    2.  And then also for the latest record we can remove below the first email body endline
    3. We can also delete record from mimeattachment or just delete the body which contains the attachment base64 encoded string. 
     
    Also, if you know if there is any non-premium free connector/API available which can do any of the points above.
     
    Thanks again!
     
    PS: Meanwhile, we can do retention policy over microsoft 365 emails
     
    Regards,
    Ghulam Rasool

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 36 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans