Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

Email to Case Creation in CRM 365 Online

(0) ShareShare
ReportReport
Posted on by

Hello,

We have an existing Automatic Record Creation and Update Rules. Buth this is not capturing the Description field. We have a new requirement that the Description field should be included in the view/report. I cannot edit the component in the Prod environment as it is a managed solution. Is it possible to achieve it using a process workflow? And how. Please help.

Thanks,

CRMFan

  • Suggested answer
    Ben Thompson Profile Picture
    6,350 on at
    RE: Email to Case Creation in CRM 365 Online

    For issue 2 this article appeared in my linkedIn feed earlier today and shows how to remove the HTML formatting meganvwalker.com/removing-html-from-email-description-record-creation-rules . It uses Jason Latimer's  String workflow utilities available at github.com/.../CRM-String-Workflow-Utilities

  • Community Member Profile Picture
    on at
    RE: Email to Case Creation in CRM 365 Online

    Hi Ben,

    Thank you very much for your timely response. I did exactly as you instructed and I was able to create the workflow that creates a Case record from an email. However, some fields are not being captured in the workflow. Below is a figure that shows our current email to Case record through All Record Creation and Update Rules:

    Unfilled.jpg

    The Origin and Contact fields are not populated. I do not know where to pull the data for these fields. Please see below:

    Unfilled.jpg

    Moreover, when I try to access the Case record, I have the description field filled up with trash(pardon my word for this), the field contains HTML tags that should not be there. I understand that this is a given limitation of CRM 365 as the platform is not yet capable of handling RichText format field. Please see the figure below:

    Description.jpg

    I have tried using a javascript taken from one blog in order to trim the HTML tags in the Description field but to no avail. Below is the JS code I have used:

    function trimHtml() {

    if (Xrm.Page.ui.getFormType() != 1) {//Check if the form type is not create form

    var caseDescription = Xrm.Page.getAttribute("description").getValue();

    if (caseDescription != undefined || caseDescription != null || caseDescription != "") {

    var txtDesc = caseDescription.replace(/(&nbsp;|<([^>]+)>)/g, ""); //remove all HTML tags

    txtDesc = txtDesc.replace(/ /g, '');//remove the tag

    //txtDesc = txtDesc.replace(/^\s+|\s+$/g, "");// Remove the extra spaces in the begining and end.

    Xrm.Page.getAttribute("description").setValue(""); // Clear the field to avoid duplicate text on next onload

    Xrm.Page.getAttribute("description").setValue(txtDesc); // Set the field with final email body

    Xrm.Page.data.entity.save();// Save the form after removing the spaces in Description field.

    }

    }

    }

    So, I have two issues now:

    • Populate the Origin and Contact fields
    • remove the HTML tags in the Description field (javascript or plugin)

    I will appreciate it very much if you can extend more help on this. 

    Regards,

    CRMFan

  • Verified answer
    Ben Thompson Profile Picture
    6,350 on at
    RE: Email to Case Creation in CRM 365 Online

    The best way to do this would be to add a workflow that is triggered when the Regarding Field is changed on the email. In that workflow you then want to check that the Regarding (Case) record exists and that the Description field within the Regarding (Case) record doesn't have text within it. Provided both those criteria are met you could then update the Description field in the Regarding (Case) record with the description in the email.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Featured topics

Product updates

Dynamics 365 release plans