Using jQuery/javascript in an email template

I have a customer who created a notification on the oppo entity where a manager gets notified if a salesperson creates an oppo with a forecast > $100,000. In the notification they put the forecast amount in the body of the email however it's not formatted. It shows as 123,456.78. I know I can modify the view to add the formatted currency but I was hoping I could use jQuery/javascript to do this and possibly use it for other more advanced formatting as well. Does anyone know if there is a way to do this inside an email template/notification/workflow send email task? Thanks :-)

  • 0

    Brad

    If you want to format currency information then you would need to consider where the value is calculated and added to the notification. A notification on screen is merged serverside with HTML and then sent to the browser. Post-processing a notification would be ugly. Can you not add in #oppo_forecast_cid#?

  • 0

    Hi Jeff,

    Yes I can add the #oppo_forecast_cid# and that adds the $ but for some reason when sending an email notification under the opportunity - notifications tab it doesn't put in the commas so the email will show $180000.00. It does put in the commas if sending an email from an email template outside of notifications...maybe it's a bug in this version (7.1.k)?? I thought maybe I would just modify the view but it's using the vNotificationOpportunity view which is not modifiable through the ui. In reality the customer would like for an opportunity forecast to be formatted as $180K instead of $180,000.00 for easier reading?? I'm wondering if I could add a computed column to the opportunity table that will format the field the way I want it and then just use that field? Thoughts? Thanks Jeff.

  • 0

    Jeff,

    Just FYI, I went ahead and added a computed column in the oppo table and formatted it the way I needed it to. I then added a translation record so the field shows up with the proper translation in the email template and it worked great. Thanks Jeff.