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
ericlericl 

Send An Email Button - Default to Email?

After several years, our salespeople are now consistently using SF.com to log all their tasks and activities with their contacts. They click the Send an Email button to send an email to their contact and create a completed task. Now here's the problem. Instead of logically defaulting to a Type of Email, it creates the task with a default Type value of blank. I asked SF.com how to customize that and was told this was intentional and could not be customized (which frankly defies belief). I was told the best solution would be to create a custom button that did create the task with a value of Email.

 

So that being said, what's the best way to clone this functionality and create a custom button? I'm not seeing an obvious way to do this either.

SFDCRRSFDCRR

one way is creating a record type on activity . OR in SFDC you can create an event with the prefillied values based on a object type.

 

Thanks 

 

 

Message Edited by SFDCRR on 10-29-2009 03:20 PM
Rasmus MenckeRasmus Mencke

You can write an Apex trigger that will update the type with a before statement. I have added this s a blog post as well:

http://blog.sforce.com/sforce/2009/10/default-task-type-to-email-when-sending-an-email.html

 

 

trigger SetTaskType on Task (before insert) {
For (Task nc:Trigger.new) {
String subject = nc.Subject;
String description = nc.Description;

if ( subject != null && subject.startsWith('Email:') && description.startsWith('Additional To:')) {
nc.Type = 'Email';
}
}
}