You need to sign in to do that
Don't have an account?
Sankeerth Reddy
Can I edit the TextBody of EmailMessage object when registering a case from Email-to-Case?
Hi,
Can I write a 'after insert' trigger on EmailMessage object to edit the TextBody of incoming Mail?
Is it possible in Salesforce?
Can I write a 'after insert' trigger on EmailMessage object to edit the TextBody of incoming Mail?
Is it possible in Salesforce?
The EmailMessage object https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessage.htm?search_text=emailtemplate permits the TextBody field to be updated
Triggers can certainly be written on EmailMessage including afterInsert triggers.
Note that some fields on EmailMessage can't be updated like Incoming and ParentId (the case it is associated to). See the doc https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessage.htm?search_text=emailtemplate
Hope this helps.
Kindly mark this as solved if it;s resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
I was not able to update the TextBody of EmailMessage through an after insert Trigger, but achieved it using before insert trigger.