Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m sad

Saving space by deleting emails - E2EA object prevents it though! Any ideas??

Hi Community - we hope you can help!

We are having an issue with iHance in our salesforce org. We process a lot of emails and the storage required by these emails has recently caused us to exceed our Salesforce storage limits. With Salesforce data being so expensive, we thought, no biggie, we'll just delete the oldest records in the offending objects, namely the ihance "Email" object and the "E2EA" object. To accomplish this we wrote some code that would execute every month and delete the emails and email addresses (the E2EA object) for emails that are over 2 years old.

Once we deployed our code, we realized that a trigger on the E2EA object prevented the deletion of the record, and sadly, since iHance is managed code, we couldn't modify their trigger to remove this test. We're stuck with no way (that we know of), to delete some of the records that are causing us to exceed our storage limits.

Does anyone have any idea how we can get these records deleted?
1 person has
this question
+1
Reply
  • I have same issue. SInce this was left unanswered for over a month now, doesn't look promising that I'll get an answer or even a suggestion.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • The product uses junction tables (such as E2EA, EA2C, EA2L, etc.) to allow for a many-to-many relationship in Salesforce. For example, this allows one single email to be related to many contacts, many users, and even many leads.

    We have followed strict Salesforce best-practices when developing this product to allow for this behavior. The problem is that these junction tables can get rather large. Part of the problem is that Salesforce does not charge fairly for storage. These records consist of a pair of records (two matching 18-digit Salesforce Ids), yet a single row may be just as consuming as an entire lead record. See this for more information.

    Another problem is that these junction tables grow in proportion to what matching records you have. So in order to reduce storage in the junction tables, you have to reduce one side of the equation. For example, the E2EA table would have to have either Emails removed, or Email Addresses removed in order to reduce the size. Removing a single row for the E2EA table is not otherwise possible. But once an Email or Email Address is removed, you should see the E2EA table size be reduced in proportion.

    Hopefully that makes sense. Email retention policies can help with this. You may also consider using the email-to-activity feature which will reduce email retention periods; however, this will increase the size of the Activity object instead. It may be a wash - it's hard to predict.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated