oh so you want a new line in a field.
Do a quick search. there are some threads on this. It is not easy.
I've been searching and reading for months for a solution to this. If you have any links to info, please share.
Thanks!
I've got a method that works. It's delicate and it's probably best if I walk you through it remotely. DM me if you want.
Example audit trail field:
Finally revealed here: http://blog.teknkl.com/dark-mkto-alleys-line-break-token/
Sanford Whiteman, your solution works great when the values need to be stored like this in a history field. The issue arises when we use that history field as a token in an email. For example, here's the value in the lead record:
2017-07-24 13:48:10: Visited 5 or more web pages in 1 day
2017-07-24 12:14:09: Filled Out Contact Us Form as Potential Customer (Overseas Adventure Travel): Contact Us 2.0 (USA) on www.avanade.com/en-us/contact
But when we use {{lead.Interesting Moment History}} in an email alert, it appears as follows (with no line breaks):
Any ideas on how to have this render properly in an email?
${display.br($lead.InterestingMomentHistory)}
in a Velocity token.
Different output contexts, different line break sequences....
That doesn't seem to work. Here's the exact velocity token - called {{my.IM History}} that I'm using:
${display.br(${lead.avanadeInterestingMomentHistory})}
For your reference, the history field is built as follows:
{{lead.Last Interesting Moment Date}}: {{lead.Last Interesting Moment Desc}}{{my.line-break}}{{lead.Avanade Interesting Moment History}}
where "my.line-break" is using the approach you describe in this post.
What kind of "doesn't work" -- what's the output HTML?
$display.br() is a built-in method to replace true newlines with HTML <br />, so it's perfect for this. (We could write the replacement in VTL but shouldn't need to.)
Here's the token:
Here's how the token is used in the email alert:
And here's how it renders in an email (instead of pulling the history value from the lead record, it's including the actual script):