In this webinar, our experts showcase a variety of demo use cases of how different components of the...
As you start to use crm 4 you will sooner or later desire new features or enhancements to what is available out of the box for formatting an email. For example, one of the requested features we have had is nicely formatting dates. Out of the box when you email merge a date/time field the date will format as: mm/dd/yyyy hh:mm am - which looks kind of ugly.
With a relatively straight forward plug-in on the 'send' message on the email entity, you have access to change anything on the email message after it has been created by crm.
For example one option would be to create your own 'formatting' tags. In our case we needed a nicely formatted date in the format such as January 01, 2010 with no date/time. By writing a plug-in using the message above we created a simple plug-in that looks for tags any type of date or date type and replaces with a nicely formatted date.
So we can have our own formatting tags right in our template:
The only caveat is to not use codes that overlap with html. This concept can be expanded to fetch addition data or add additional formatting.
Good post. An alternative method, which I've employed, is a custom workflow action. Two inputs, one the datetime value and the other the .net formatting code. The output is the ToString(formatting code) of the datetime input. You can then have any format in the email you like. Very flexible.
Yep - that's a good method two. We have used that in the past. We developed the plugin since the customer had to many fields to be formatted.