locked
HTML Formating RRS feed

  • Question

  • Does CRM 4.0 strip HTML formating from workflow emails?  Is there any way to get around that if it does?
    Wednesday, October 1, 2008 7:07 PM

Answers

  • Here is the solution for linking to pages in CRM.

    First you need to create a custom attribute to hold your URL. This attribute needs to be text and at least 150 chars long.

    Second add the attribute to your form any place you'd like.

    Third use the following code generated by Adi Katz over @ mscrm4ever as an on Save event for the form

    var htmlLink = '<a href="http://[server]:[port]/[company]/sfa/quotes/edit.aspx?id='
         htmlLink += crmForm.ObjectId;
         htmlLink += '">Click Here</a>';
     
    crmForm.all.[your_url].DataValue = htmlLink;

    This will set the value of your_url to be the url of the form you are lookign at.

    Now in your custom workflow you  will be able to add the field for the URL and when you send it outlook will
    recognize it as a link.
    Wednesday, October 1, 2008 10:53 PM

All replies

  •  

    I don't think there is a way of doing that using a simple workflow.

     

    If you're looking for a simple solution as opposed to writing a custom workflow activity or plug-in take a look at this post which uses a simple js technique.

     

     

     

    Wednesday, October 1, 2008 8:08 PM
  • Right that would be to strip the encoding.  But the problem I'm running in to is that I want it to send the link to outlook and not kill the HTML encoding, as just the text defeats the purpose of sending the link in the first place.
    Wednesday, October 1, 2008 10:17 PM
  • Here is the solution for linking to pages in CRM.

    First you need to create a custom attribute to hold your URL. This attribute needs to be text and at least 150 chars long.

    Second add the attribute to your form any place you'd like.

    Third use the following code generated by Adi Katz over @ mscrm4ever as an on Save event for the form

    var htmlLink = '<a href="http://[server]:[port]/[company]/sfa/quotes/edit.aspx?id='
         htmlLink += crmForm.ObjectId;
         htmlLink += '">Click Here</a>';
     
    crmForm.all.[your_url].DataValue = htmlLink;

    This will set the value of your_url to be the url of the form you are lookign at.

    Now in your custom workflow you  will be able to add the field for the URL and when you send it outlook will
    recognize it as a link.
    Wednesday, October 1, 2008 10:53 PM