+ Start a Discussion
Chris McFarlingChris McFarling 

Update EmailMessage RelatedToId

I want to relate an outbound email message to a different Opportunity. EmailMessage.RelatedToId holds the Id of the Opportunity for which it's related to. I attempted to simply change the RelatedToId on the EmailMessage using Execute Anonymous but it doesn't work. Getting error "System.SObjectException: Field is not writeable: EmailMessage.RelatedToId".
EmailMessage msg=[SELECT Id, RelatedToId FROM EmailMessage WHERE Id = '02so000000I7rXuAAJ'];
Update msg;

Is there another method of updating this field?
David Jackson AUDavid Jackson AU
Any updates on how the RelatedToId field can be inserted
Judith DrakeJudith Drake
I did not find any update on this topic.

Thanks and Regards,
Judith J. Drake
amelia pearlamelia pearl
EmailMessage is only available for organizations that use Email-to-Case or Enhanced Email, which is automatically enabled for most  talktowendys (https://www.talktowendys.today/)
ravindar shahravindar shah
I also not find any update on this topic
thanks and regards,