You need to sign in to do that
Don't have an account?

Trigger for Converting Amount(Currency/Number) to Words
Has anyone else come up with a solution by Trigger for this? I have been trying to figure this out for a few weeks now but to no avail.
for e.g
I found apex class from this website http://http://salesforcewithkiran.blogspot.in/2013/05/number-to-words-in-apex.html
that works fine for apex class but not for apex trigger.
and I found another site https://sites.google.com/a/forcegenie.com/kb/home/numberstowords/7-ways-to-integrate-with-your-salesforce-org/continouos-conversion-from-number-currency-to-text-using-a-trigger with trigger program to convert but they calling a NumbersToWords apex class but there is no code for that class.
Need a Trigger to convert numbers/currency to words
Anyone have idea about this?
Thanks!
for e.g
Amount - 200$ Amount in words - Two hundred Dollar only.
I found apex class from this website http://http://salesforcewithkiran.blogspot.in/2013/05/number-to-words-in-apex.html
that works fine for apex class but not for apex trigger.
and I found another site https://sites.google.com/a/forcegenie.com/kb/home/numberstowords/7-ways-to-integrate-with-your-salesforce-org/continouos-conversion-from-number-currency-to-text-using-a-trigger with trigger program to convert but they calling a NumbersToWords apex class but there is no code for that class.
Need a Trigger to convert numbers/currency to words
Anyone have idea about this?
Thanks!
thanks @Keith C
Am just pasting the code written by @Keith C in Salesforce.Stackexchange.com
The class I referenced in question works on a single number that must be a positive Longvalue. So in trigger will have to loop over what can be the many (bulk) values passed to the trigger via the Trigger.new list of the trigger context, convert the value to a Long and then assign the resulting String. Because it is a before trigger, the result will automatically be saved to the database.
if it were a couple of custom fields on Contact, the code would look like this:
(will also have to copy and add the NumberToWord class to org before creating the trigger.)
try this code
First You Create NumberToWord Class- Next Step is Create trigger-
Thanks
Rupal