You need to sign in to do that
Don't have an account?
prb
Email to Case - Store as case comment
Does anyone have a best-practices recommendation for adding a case email as a case comment?
It seems odd to me that when you activate email to case the messages are stored as emails and not case comments. My first instinct is to make an s-control to merge these two into one display but it seems that I'm missing something simple. I can't be the first person to encounter this. How are other people handling this?
I created an s-control that merged emails and case comments into one display to avoid needlessly duplicating content.
All Answers
Emails and case comments are logically separate things -- email messages contain much more info. You could make a workflow from email messages that copies the contents of the body of the email to a field on Case, and then make a trigger on Case which makes a comment out of that field.
Or perhaps you could modify the Visualforce Case History Timeline to your needs.
I created an s-control that merged emails and case comments into one display to avoid needlessly duplicating content.
That is a great idea, and it works for me. Mostly. Unfortunately I cannot figure out how to clean up the this field's text afterwards.
Here's my simple trigger:
You cannot do
in the trigger, as you cannot modify Case object on "after update". You cannot use "before update" because then you cannot insert comments.
It's my APEX first trigger, so I apologize if it's a dumb question - but any help will be greatly appreciated.
Hi There,
Thanks for the code snippet I'm trying to use this in my production org but it's giving me an error that I don't have enough Test Coverage.
This is my first and only apex trigger I'll need is there any chance you can help with the test class?
Thanks!
BT