You need to sign in to do that
Don't have an account?

Update ActivityDate of Task via EmailMessage trigger
Hello Dears,
I wrote a trigger on the EmailMessage to create a task with the due date value woulde be Date.today()+2. But, the activity date is not getting updated with the given value as Date.today()+2.
Below is the my assignment for activitydate in the trigger:
ActivityDate = Date.today()+2
But, it is not updating with the given value. By default, it stores today's date.
Please suggest me how to update this field while creating a task.
Thanks,
Rohitsharma
I wrote a trigger on the EmailMessage to create a task with the due date value woulde be Date.today()+2. But, the activity date is not getting updated with the given value as Date.today()+2.
Below is the my assignment for activitydate in the trigger:
ActivityDate = Date.today()+2
But, it is not updating with the given value. By default, it stores today's date.
Please suggest me how to update this field while creating a task.
Thanks,
Rohitsharma
On which object you want to do this?
you can try this "Lastactivitydate" in place of activity date.
Thanks.