Question
Velocity Script to convert value into currency
I have a field called Prev YTD Transaction Volume which has numerical data in the format 12387646. I am trying to write a velocity script to present this data in a currency format $12,387,646.00. The token for my field is {{lead.Prev_YTD_Transaction_Volume__c}}
What would be the best way to write the script. I current have the script as below but the value returned is incorrect.
#set($total = ${lead.Prev_YTD_Transaction_Volume__c})
#set ($total = $number.currency($total))
${total}