locked
Including hyperlink with dynamic fields in Email templates (CRM 2011) RRS feed

  • Question

  • Hi All,

    We have a requirement to include a URL (with dynamics fields) in the e-mail template. We ran into below strange issues when email gets delivered to different email providers.

    Email Provider

    URL getting delivered as hyperlink (IE 9)

    Hyperlink clickable (IE 9)

    Outlook

    Yes

    Yes

    Outlook web client

    No

    No

    Gmail

    Yes (but broken because of spaces in the query string   parameter)

    Yes

    Yahoo

    No

    No

    Hotmail

    No

    No

    And we also observed that we have option to insert hyperlink in Send e-mail step of workflow (by this approach URL is getting delivered as hyperlink for most of the browsers), but the same option is not available in e-mail templates. So is there any alternate approach to include hyperlinks in e-mail templates ? Your suggestions are much appreciated.

    Thanks in Advance,

    Shaikshavali Mohammed.

    Tuesday, September 25, 2012 6:55 AM

Answers

  • Hi All,

    Out of box anchor tag worked for me like below.

    <a href="http://www.xyz.com/common/landingpage.aspx?param1={!Case:Case Number;}&Param2={!Case:Resolution Type;}"> Click here </a>

     I am not sure why this didn't work for me earlier. Anyway thanks for responses.

    -Shaik

    Thursday, April 11, 2013 9:05 AM

All replies

  • Have you got any reply on this?

    Tony

    Friday, September 28, 2012 9:28 PM
  • I have resolved above issue by following below steps and hyper link is clickable and redirectable perfectly in all the e-mail providers

    1. Have a hidden attribute on the entity

    2. Save your hyper link in the hidden attribute as an anchor tag. Before saving the URL make sure that your query string parameters are encoded by using below code

    HttpUtility.UrlEncode(“string”) (http://msdn.microsoft.com/en-us/library/4fkewx0t.aspx)

    <a id="hiddenHyperLink" href="URL along with your acutal query string parameters">Click here</a>

    3. Use the hidden attribute on the e-mail template

    Hope this helps.

    -Shaik

    Monday, October 1, 2012 8:38 AM
  • Hi Shaikshavali,

    There is out of box solution for this using following code plex solution

    http://crm2011workflowutils.codeplex.com

    hope this helps..


    MayankP
    My Blog
    Follow Me on Twitter

    Monday, October 1, 2012 9:17 AM
    Answerer
  • Hi MayankP,

    Looks like the (http://crm2011workflowutils.codeplex.com) code activity is to support hyperlinks which points to the records in the CRM itself. I need to have a external URL with CRM entity dynamic attributes as query string parameters. In this scenario will this solution work ?

    -Shaik

    Monday, October 1, 2012 10:48 AM
  • in this case you need the Business Productivity Workflow Tools (link below)
    http://crmaccelerators.codeplex.com/releases/view/26691

    but this one is only for CRM 4.0, if you need for CRM 2011 you need download source code and upgrade that for CRM 2011 version.


    MayankP
    My Blog
    Follow Me on Twitter

    Monday, October 1, 2012 11:39 AM
    Answerer
  • Thanks MayankP,

    Before posting above question in the forum, I came across http://crmaccelerators.codeplex.com/releases/view/26691 and as it supports for only CRM 4.0 I haven't digged into it more and came up with the above alternative.

    -Shaik

    Monday, October 1, 2012 1:32 PM
  • yes, but it works fine with CRM 2011 (with same code becuase of backward compatibility) and it provides source code as well which you can easily convert to CRM 2011 application as shown in following blog.

    http://blogs.msdn.com/b/crm/archive/2010/11/17/upgrading-a-crm-4-0-custom-workflow-activity-to-crm-2011.aspx

    the reason i think it's better use this is becuase, currently you need this for one entity (or in one scenario), tomorrow there would be some more or different requirement on another entity, these workflow utility will help to make in future you can easily cater for these requirements in CRM..

    hope this helps..


    MayankP
    My Blog
    Follow Me on Twitter

    Tuesday, October 2, 2012 8:19 AM
    Answerer
  • Hi All,

    Out of box anchor tag worked for me like below.

    <a href="http://www.xyz.com/common/landingpage.aspx?param1={!Case:Case Number;}&Param2={!Case:Resolution Type;}"> Click here </a>

     I am not sure why this didn't work for me earlier. Anyway thanks for responses.

    -Shaik

    Thursday, April 11, 2013 9:05 AM