How to format a decimal into a currency string in an apex class? (without using apex page elements)
I am currently formatting a currency manually for a class which is not intended to be displayed on a SF page, hence cannot use apex.output* objects. (It is being used in an email that is "built" in the class.) This is not allowing me to use any of SF wizardry ... is there a method that will allow me to include a format string to convert the Decimal value that will use the current locale settings? (Is 123456.78 displayed as 123,456.78 or 123.456,78?) If not, then how about a format string that will allow me to indicate I want 2 decimal places? (I can get the commas using
But it doesn't display the .00 at the end.)
How to Html email based on existing VF custom page layout using custom controller
I would like to send a VF custom page out as an HTML email, re-using both the VF page code and the custom controller code. Any suggestions? Current solution: Built up HTML string loosely based on the VF page using the custom controller and assigned it as the email body in an apex class. Not getting to use any of the SF automation.