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
Yogesh BiyaniYogesh Biyani 

Task and EmailMessage relationship

I am a bit confused about the relationship between Task and EmailMessage objects.

One can find the Task from EmailMessage using ActivityId but not sure how to get the EmailMessage from Task. Can someone show how to get the EmailMessage from the Task object?