Notifications
Clear all
Jan 12, 2022 4:19 am
How to create an Email Task in the Salesforce Activity timeline using Apex?
1 Reply
Jan 12, 2022 4:20 am
insert new Task( Subject = 'Subject: Test email....', WhoId = myContact.Id, WhatId = myOpportunity.Id, TaskSubtype = 'Email', ActivityDate = Date.today(), Description = 'emailtest1', Status = 'Completed' );
Check out more details here: How to create email / SMS activity using Apex
and How to use an Apex Email Service to store emails on a record EXACTLY as Salesforce does