<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Level 200</title>
        <link>http://blog.crmbuzz.net/category/16.aspx</link>
        <description>Customizations Level 200 Difficulty</description>
        <language>en-US</language>
        <copyright>Abe Saldana</copyright>
        <managingEditor>abraham@CRMBuzz.net</managingEditor>
        <generator>Subtext Version 1.9.4.78</generator>
        <item>
            <title>Email Templates tag merging</title>
            <link>http://blog.crmbuzz.net/archive/2007/07/26/Email-Templates-tag-merging.aspx</link>
            <description>&lt;p&gt;I was working on a small project making some changes to the Email Templates when I got the requirements to create some meta tags and implement detail logic that will depend on the value of a field, that was interesting and challenging at the same time and  make that customization been supported by the infrastructure of CRM, well I made changes but these are unsupported code, these are the steps on how to make the customizations:&lt;/p&gt; &lt;p&gt;1) Make the modifications to ...\Activities\email\edit.aspx file. &lt;/p&gt; &lt;p&gt;2) Update the javascript function ApplyTemplate() and include the functionality required for the customer.&lt;/p&gt; &lt;div style="border-right: windowtext 1pt solid; padding-right: 4pt; border-top: windowtext 1pt solid; padding-left: 4pt; background: #d9d9d9; padding-bottom: 1pt; border-left: windowtext 1pt solid; padding-top: 1pt; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;function ApplyTemplate()&lt;?xml:namespace prefix = o /?&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormalCxSpMiddle" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-add-space: auto; mso-pagination: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;{&lt;/span&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;var oTarget = ChooseTemplateTarget();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;if (oTarget == null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;return;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;var sUrl = "/_grid/cmds/dlg_bulkemail.aspx?bulkemail=false" + "&amp;amp;objectTypeCode=" + oTarget.otype + "&amp;amp;objectId=" + oTarget.oid;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;var sResponse = openStdDlg(sUrl, null, 550, 850);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;if (sResponse != null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;// Get Response from the email template&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;var templatedescription = sResponse.EmailBody ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;// Get the contact/account id for searching&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;var ToRecipients = crmForm.all.to.Items();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;var customerid = ToRecipients[0].id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;// Get status for the contact/account &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;&lt;font color="#008000"&gt;var validationonBoolean = GetWebServiceValidation(customerid);&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;if (validationonBoolean)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;// Customer Validation is TRUE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;templatedescription = stringReplace(templatedescription&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;font color="#000000"&gt;,"[LOCALEDMESSAGE]","Replace message with English version");&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;}else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;// Customer Validation is FALSE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;font color="#000000"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;templatedescription = stringReplace(templatedescription&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;font color="#000000"&gt;,"[LOCALEDMESSAGE]","Replace message with Spanish version");&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;font color="#008000"&gt;&lt;span style="mso-tab-count: 2"&gt;                                &lt;/span&gt;crmForm.all.description.InsertValue ( templatedescription );&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;span style="mso-tab-count: 1"&gt;                &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;3) After that I used the normal string.Replace function finding the function only replaced the first instance, that will take me to the second correction and make the following function:&lt;/p&gt; &lt;div style="border-right: windowtext 1pt solid; padding-right: 4pt; border-top: windowtext 1pt solid; padding-left: 4pt; background: #d9d9d9; padding-bottom: 1pt; border-left: windowtext 1pt solid; padding-top: 1pt; border-bottom: windowtext 1pt solid; mso-element: para-border-div; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217"&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;function stringReplace(originalString, findText, replaceText)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;var pos = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;var len = findText.length;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;pos = originalString.indexOf(findText);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;while (pos != -1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 15pt; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 0.5in; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;preString = originalString.substring(0,pos);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 0.5in; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;postString = originalString.substring(pos + len,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 0.5in; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;originalString.length);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 0.5in; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;originalString = preString + replaceText + postString;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 0.5in; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;pos = originalString.indexOf(findText);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; text-indent: 0.5in; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;return originalString;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="border-right: medium none; padding-right: 0in; border-top: medium none; padding-left: 0in; background: #d9d9d9; margin-bottom: 0pt; padding-bottom: 0in; border-left: medium none; line-height: normal; padding-top: 0in; border-bottom: medium none; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: #984806; font-family: 'Century Gothic','sans-serif'; mso-themecolor: accent6; mso-themeshade: 128; mso-bidi-font-family: 'Courier New'"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;The rest was a simple implementation of your Web Services call, please read the previous blog called "&lt;a href="http://blog.crmbuzz.net/archive/2007/05/18/How-to-call-my-web-service-using-Javascript.aspx"&gt;How to call my web service using Javascript?&lt;/a&gt;"&lt;/p&gt; &lt;p&gt;Remember that this is an Unsupported customization and when a service patch come it will provably remove those customizations.&lt;/p&gt; &lt;p&gt;I hope this information help you to add more flexibility to the email templates.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span style="font-size: 9pt; mso-bidi-font-family: arial; mso-fareast-font-family: 'Times New Roman'"&gt;Abe Saldaña &lt;/span&gt;&lt;span style="font-size: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span style="font-size: 9pt; mso-bidi-font-family: arial; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;a href="http://www.crmbuzz.net"&gt;http://www.crmbuzz.net&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span style="font-size: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span style="font-size: 9pt; mso-bidi-font-family: arial; mso-fareast-font-family: 'Times New Roman'"&gt;This all is undocumented and unsupported. Therefore you should only try these kinds of modifications if you feel comfortable with this. &lt;br /&gt;Everything here, though, is my personal opinion and is not read nor approved before being posted. No warranties or other guarantees will be offered as to the quality of the opinions or anything else offered here. &lt;/span&gt;&lt;span style="font-size: 9pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt; &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal"&gt;&lt;span style="font-size: 9pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blog.crmbuzz.net/aggbug/10.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Abe Saldana</dc:creator>
            <guid>http://blog.crmbuzz.net/archive/2007/07/26/Email-Templates-tag-merging.aspx</guid>
            <pubDate>Fri, 27 Jul 2007 02:31:31 GMT</pubDate>
            <wfw:comment>http://blog.crmbuzz.net/comments/10.aspx</wfw:comment>
            <comments>http://blog.crmbuzz.net/archive/2007/07/26/Email-Templates-tag-merging.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crmbuzz.net/comments/commentRss/10.aspx</wfw:commentRss>
            <trackback:ping>http://blog.crmbuzz.net/services/trackbacks/10.aspx</trackback:ping>
        </item>
    </channel>
</rss>