function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mahesh NirmalMahesh Nirmal 

Duplicate Email Stored on Contact Activity

The scenario is-

I have an email reminder going out to user. I have implemented the email-to-salesforce functionality to Stored the Email on Contact Activity. Used the ref:{!contactId} reference field in template.

The bug is that the activities are getting stored twice on Contact.

SSThis issue is with only a specific Email template for Reminders. For other templates, it stores the email once.

Please suggest a way to fix it.

Thanks

AnudeepAnudeep (Salesforce Developers) 
Hi Mahesh - Do you happen to have a trigger on Activity_History__c record. Or can you check if you have any trigger running in the background when the email (You can test this by capturing debug logs)

As far as I know, this doesn't happen unless there is a custom code in place. Also, I found this idea that appears relevant

Let me know if this helps
Mahesh NirmalMahesh Nirmal

Hi Anudeep,

I have checked but did not found any Triggers on Activity_History__c.

AnudeepAnudeep (Salesforce Developers)