web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Converting HTML E-Mail to Plain Text

(0) ShareShare
ReportReport
Posted on by 375

I am currently having an issue that when someone e-mails in which creates a 'ticket' on CRM, the text from the e-mail that is passed through to a field on CRM is displaying in HTML format. What I would really like to do is have the messages passed/converted to plain text to avoid having to filter through 100+ lines of code just to read the 1 sentence I've received. 

I've had a look on the internet at a few solutions inc. (http://blogs.msdn.com/b/ukcrm/archive/2008/07/10/converting-html-e-mail-to-plain-text.aspx) who recommends using a plugin. Unfortunately I have 0 experience with plugins in CRM so I'm looking to see if someone could suggest an alternative solution to this issue or possibly assist me with the plugin tutorial?

Thank you very much, I appreciate your time and will hopefully return the favor where possible. 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Hosk Profile Picture
    on at

    The only way I can see to do this is using a plugin because you need to strip away all the html tags from the text.

    I guess you could do this manually with copy and paste into a tool but this is a very slow method.

    I have seen this issue raised a number of times, so you could raise it on Microsoft Connect as an enhancement and it would get some support

  • Verified answer
    NatrajY Profile Picture
    3,040 on at

    I had a similar issue like this, I solved a different way. Both involve Javascript and OData. In my scenario, this was required as the Email was converted into a case using a workflow that runs, when an email lands on a queue. Initially I did copy the email entity's description field, into a custom text area field in case entity. I hit the issue you mentioned.

    Solution:

    Retrieve the email entity using odata or ajax, when the entity that requires the email text loads. You need the description field in the email, as it contains the message body. Create a iframe to just display the contents of the email. My theory is that since the email is already in the system, we don't need to store the contents again into a custom field. We just need to retrieve this contents when the form is loaded purely for display purposes(in my situation it was the case form)

    In the form load, set the iframe html using the retrieved email description field. I have created some sample for you at http://jsfiddle.net/g4SpL/

    In my case the iframe was called description and I loaded the email's description field into this iframe. This approach has two advantages

    1.) Content displayed is nicely formatted and exactly like the email body

    2.) You are not duplicating the content of the email.

    Please let me know if this is what you are looking for.

  • Community Member Profile Picture
    on at

    Hi Jamie,

    I was wondering whether you have a solution to above problem that you could share as I am currently experiencing the same issue.

  • NatrajY Profile Picture
    3,040 on at

    Hi Samuel - Here is the post related to my answer -> dreamingincrm.com/.../convert-to-case-displaying-email-contents

  • Community Member Profile Picture
    on at

    Hi Natraj,

    Thank you for sending me the link. Also, I may need an approach that will remove the tags in the email or transfer the plain text to Description field of the Case. Any help will be much appreciated. I am using CRM 365 (on premise).

  • Suggested answer
    DanV Profile Picture
    on at

    If you aren't up for creating a plug-in (or don't know how) an easy option is to use North52 formula manager function StripHtml('inputstring').   It's free, easy and supported.

    Worked like a charm for us.  Using North52 interface is just like creating a workflow.  (config page below).  The forumula copies the Description field of an email to Description No Html when and email is created or the description is changed.  As you can see in the config page it's very straightforward.

    We now have a Description No Html field we use in notes, cases and other areas where we don't want the HTML tags.

    You can use the free version of North52 and have the solution up and running in less than 1 hour including North52 installation.  No coding or training required.   

    http://support.north52.com/knowledgebase/articles/464067-n52-bpa-functions-html

    5633.Capture.JPG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans