Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

I want Javascript code to populate the body of email to description field in text format of a case entity as its showing it in HTML format

(0) ShareShare
ReportReport
Posted on by 40

Urgent

  • Sheershendu Profile Picture
    40 on at
    RE: I want Javascript code to populate the body of email to description field in text format of a case entity as its showing it in HTML format

    Hi Clofly,

    OK so I have created a new thread please follow the below link

    community.dynamics.com/.../i-want-to-assign-entitlement-to-the-entitlement-field-of-case-entity-using-plugin-also-i-have-to-attach-sla-with-the-entitlement-so-as-i-am-new-to-this-can-you-please-help-me-step-wise-along-with-the-code

    Regards.

    Sheershendu

  • cloflyMao Profile Picture
    25,208 on at
    RE: I want Javascript code to populate the body of email to description field in text format of a case entity as its showing it in HTML format

    Hi Sheershendu,

    OK, could you open a new thread for the new question? I will reply to you in that thread, thanks.  :)

    In addition, could you let me know what the target entity of plugin?(Case or Entitlement) It will be helpful if you could share more details about your requirement.(Please also post description of requirement to the new thread.)

    Regards,

    Clofly

  • Sheershendu Profile Picture
    40 on at
    RE: I want Javascript code to populate the body of email to description field in text format of a case entity as its showing it in HTML format

    Hi Clofly,

    I want to assign Entitlement to Case using Plugin also I have to attach SLA with the Entitlement. So, as I am new to this can you please help me step wise along with the code?

    Thanks & Regards,

    Sheershendu Bhattacharjee

  • Sheershendu Profile Picture
    40 on at
    RE: I want Javascript code to populate the body of email to description field in text format of a case entity as its showing it in HTML format

    Thanks a lot Clofly

  • Verified answer
    cloflyMao Profile Picture
    25,208 on at
    RE: I want Javascript code to populate the body of email to description field in text format of a case entity as its showing it in HTML format

    Hi Sheershendu,

    You can just replace HTML tags by using regex:

    https://stackoverflow.com/questions/15180173/convert-html-to-plain-text-in-js-without-browser-environment

    Or creating a dummy div element and save description value as its innerHTML value, then return the element innerText value.

    https://www.labnol.org/code/19813-convert-html-to-text

    Regards,

    Clofly

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 87

Overall leaderboard

Product updates

Dynamics 365 release plans