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
Karen PannunzioKaren Pannunzio 

Custom button - send email

I have a custom button that send a product flier to a contact and logs an activity.
How do I add a line in the code to default the activity type to email?

Please advise.
Thanks,
Karen PannunzioKaren Pannunzio
User-added image
Karen PannunzioKaren Pannunzio
It is assigning the type Email to the task but it displays a pop-up "A problem with OnClick Java Script for this button or link was encountered:  'Email' is undefined
Deepak GulianDeepak Gulian
User-added image

Setup --> Customize ----> Activities ----> Task Fields
Click on Type Field and Edit the picklist Value and mark it as Send Email Default as checked in above Screenshot.
Karen PannunzioKaren Pannunzio
I changed to &tsk10=Email and it is now working.  Thank you!!!!
Deepak GulianDeepak Gulian
currently its ;tsk10=Email
it should be &tsk10=Email
Deepak GulianDeepak Gulian
Please mark it as best answer so it would be helpful for others.