Skip to main content
I currently have an html email template that includes the merge field  {!Case.Last_Case_Comment} .

 

I want to use a Visualforce template, but when I try to use the "same" merge field in the vf template I can't save it as I get an error message.  (The actual merge field I'm trying is {!relatedTo.Last_Case_Comment} and the template is  configured with relatedToType="Case").

 

The error message is "Error: Invalid field Last_Case_Comment for SObject Case."

 

How can I get the last case comment in to a Visualforce Email?
4 answers
  1. Jan 25, 2016, 8:18 PM
    Hacking on this now, and looks like workflow field update is limilted to 1300 characters.  Now that is probably enough to get a pretty good idea of what is going on, and is certianly easier than coding up a custom component and a visualforce email template, so you can make the call on whether to go declarative or not.  

     

    See: http://help.salesforce.com/HTViewSolution?id=000206092&language=en_US for an article declaring the limit, which specifically mentions case comment -> case field update.  

     

    That said, I dont see anything under 'considerations on field updates' so its possible that one of these two articles is out of date, have not tested: https://help.salesforce.com/apex/HTViewHelpDoc?id=workflow_field_update_considerations.htm&language=en  
0/9000