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
FinnArildFinnArild 

Email quoting

Hi - I searched the forum for this but could not find a good answer - so I try here.


Is there a way to configure the reply-to quoting settings so the posting style supports inline replying like it is described here:

http://en.wikipedia.org/wiki/Posting_style#Inline_replying

 

(Basically original lines prefixed with one or several "> ").

 

Would be grateful for some hints here.

Best Answer chosen by Admin (Salesforce Developers) 
FinnArildFinnArild

Thanks, werewolf - I actually found a solution of sorts:

 

- I created two new case fields: One for containing a quoted message and a boolean field

- I created a workflow which filled the quoted message field and put the boolean field to false

- I created a trigger which quoted the email and put the boolean field to true (after checking it first, of course ;) ...)

 

Then it was just to create a template which used this quoted case field - case solved, I guess - even if I wished SF would do this.

All Answers

werewolfwerewolf
At the moment, no, the reply function unfortunately doesn't do that -- it always puts the quote at the bottom, unindented and un-arrowed, which is more Outlook-style.
FinnArildFinnArild

Thanks, werewolf - I actually found a solution of sorts:

 

- I created two new case fields: One for containing a quoted message and a boolean field

- I created a workflow which filled the quoted message field and put the boolean field to false

- I created a trigger which quoted the email and put the boolean field to true (after checking it first, of course ;) ...)

 

Then it was just to create a template which used this quoted case field - case solved, I guess - even if I wished SF would do this.

This was selected as the best answer
FinnArildFinnArild

Just in case someone is watching this thread to have "proper" quoting in their emails, here's my quoting code. It might be a bit newbie, but it works :) ...

 

 

public String quoteText(String txt) { if (txt == null) return ''; String ntxt = ''; for (String line:txt.split('\n')) { // Get the starting quote text String StartQuote = ''; Pattern MyPattern = Pattern.compile('([> ]*).*'); Matcher MyMatcher = MyPattern.matcher(line); if (MyMatcher.matches()) { StartQuote = MyMatcher.group(1); } // Split the line up by spaces to make sure it breaks at <80 String[] linesplit = line.split(' '); List<String> newlines = new List<String>(); newlines.add(''); Integer n = 0; for (String nl:linesplit) { if(nl.length() + newlines[n].length() > 80) { n += 1; newlines.add(StartQuote); } newlines[n] += nl + ' '; } // Quote it all again for (String splitline:newlines) { if (splitline.substring(0, 1) == '>') { ntxt += '>' + splitline.trim() + '\n'; } else { ntxt += '> ' + splitline.trim() + '\n'; } } } return ntxt.trim(); }