One question I hear over and over again, is why is the task type when I am sending an email in Salesforce not defaulted to Email? This is becomes an issue when you want to do reporting on all your tasks and they are logged as your default task type which generally is "Call".

I have written an Apex Trigger you can use to overwrite the Task Type and set it to "Email" when you are sending out an email from Salesforce. The trigger will look for "Email:" in the subject and also look for "Additional to:" as the first part of the description.

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS