Tuesday, November 11, 2014

Currency Fields in Conga (aka WHERE'S MY COMMA???)

I received a case a week or so ago, asking me to add commas to the invoice template that we are using with Conga.

I looked at the template, and checked the field from which it was pulling the data within Salesforce.com.

I checked the "view data" on the Conga Dialog window, and it had a comma, I checked the "template builder" and yep - it had a comma.

Looks fine to me.



So I pulled the template - sure enough.. it's not showing up with commas!



Today, I will show you how to fix this problem. It's super easy-peasy, and you'll be a hero, and let's just be honest. Everyone wants to be a hero every once in a while.



First, let's take a look at our original template.  Notice that whoever created the original, apparently realized that the formatting was "wrong" because they added a dollar sign as a static element.


Well, it looks like that was "okay" for a couple of years, but not so much any more. 

So, I did a quick web search, and found this Conga help document called How to Format Number or Currency Values in Word Templates.   *Disclaimer: This method happens to be for Version 7, and I have not yet tested it for any other version. Version 7 is the version that is in use in my org. 

This page gives a really good overview of the different number formatting styles that can be used in a MS Word Template, so if you need to format your number in another way, take a look at that page.

There is a cool format that can change the number to words, which I want to play with, just for the novelty... but I digress! Let's fix our template to format as currency.

Now, right click on your merge field, and choose "Edit Field".




Click in the field name, and hit "End" to bring your cursor to the end of the name. (End is a button on your keyboard)



Then, type or paste in the following:


\#Currency

When you are finished, it will look something like this:




Now click "OK".

Do this for every field that should be formatted as currency. AND - don't forget to take off any static formatting that was on the template, such as the dollar sign that was on my original template. The formatting that we put into the merge field name, will add the dollar sign and the comma!

Now, test your template!



You need to follow your standard process of uploading to Conga Templates, or saving wherever you keep your templates, but now... You're done!