SugarCRM Mailmerge — Formatting Text

sugarcrmdevelopers —  December 12, 2012

SugarCRM Mail Merge is a commonly unused feature in SugarCRM.  Recently, I spoke with a client having mail merge issues; particularly, after the merge.  The important thing to remember is that although you may see the data displayed one way on the screen that does not mean the data is stored that way in the database.  For example in SugarCRM, you can format the date field.  But the value stored in the database is in yyyy-mm-dd format.  And when you merge the format is from the database.  Currency values with no cents will present nnn instead of nnn.nn.

Word template can be edited to fix the date format. For example:

1. Right click on <<Opportunities_date_closed>> and select ‘Toggle Field Codes’.
2. This will change the way this link is displayed to { MERGEFIELD Opportunities_date_closed }
3. Edit this field code to read: { MERGEFIELD Opportunities_date_closed @ “MM/DD/YYYY”}
4. When the merge is performed with this change, the field will show as MM/DD/YYYY instead of YYYY-MM-DD

There are a host of other options for different data types.