Hi All,
I am trying to use a currency value from a custom object as a token in an email and can't seem to figure out the right Velocity Scripting to have it format correctly. I want the value to appear in the email formatted as $123.45. Can anyone let me know what adjustments I should make to the script?
#*${dSServiceEventDetails_PROD_cList.get(0).sVCTotalAmount}*#
#*${dSServiceEventDetails_PROD_cList.get(0).sVCROClosedDate}*#
#set($sortedList = $sorter.sort($dSServiceEventDetails_PROD_cList, "sVCROClosedDate:desc"))
#if(!$sortedList.isEmpty())
#set($mostRecentEvent = $sortedList.get(0))
#set($mostRecentTotalAmount = $mostRecentEvent.get("sVCTotalAmount"))
$mostRecentTotalAmount
#else
Call our sales team for your offer!
#end
Thanks for your help!
Marc
Solved! Go to Solution.
Thanks for making that change. Sounds like you want:
${number.currency($mostRecentTotalAmount)}
Please use the syntax highlighter so your code is readable, then we’ll continue.
Worked great! Thanks Sanford!