Create Salesforce Task with Reminder using Apex Class

For this post describes about the create Salesforce Task with Reminder option using Apex Class:

While perform the DML option, to pass IsReminderSet as TRUE and pass the ReminderDateTime value and below are the example for your reference:

Task newTask = new Task(Description = 'Task With Reminder',
Priority = 'Normal',
Status = 'Inbound Email',
Subject = 'Other',
IsReminderSet = true,
ReminderDateTime = System.now()+1
);
insert newTask;

also if you like to pass Related To values for WHOID and WHATID, ASSIGNEDTO

WHOID to accept the LEAD and CONTACT ID’s

WHATID to accept the all other standard and custom object (but make sure to enable Allow Activities in Object level)

ASSIGNEDTO to accept the User/Queues id

Written by 

Salesforce MVP | 15x Salesforce Certified | Lightning Champion | Application Architect | 6x Trailhead Ranger | Sydney | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*