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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to create a link dynamically in Description of Email activity?

(0) ShareShare
ReportReport
Posted on by

Hi,

Here I'm creating an email dynamically(using javascript).

I want to create a clickable link in the description of email activity.

1777.link.png

If I click on "Microsoft", It should be open a new window with "https://www.microsoft.com/".

Can anybody suggest me?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at
    RE: How to create a link dynamically in Description of Email activity?

    Hi,

    This is a known issue in crm.

    Please check below links:

    community.dynamics.com/.../180143

    community.dynamics.com/.../249225

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at
    RE: How to create a link dynamically in Description of Email activity?

    Hi,

    Try using below hyperlink tag as we use when we create email manually.

    <hyperlink><name>Google</name><value>www.google.com</value></hyperlink>

    Hope you get it working.

  • Community Member Profile Picture
    on at
    RE: How to create a link dynamically in Description of Email activity?
    Thanks Preeti!

    This is the code for link.

    var mainData = {}; mainData.subject = "Email Subject"; mainData.description = "<html><body><span>Hi</span><br/><span>Please Check link Here: </span><br/><a href='https://www.microsoft.com/' target='_blank'>Microsoft</a></body></html>"; var jsonEntity = JSON.stringify(mainData); var oDataSelect = serverUrl + "/api/data/v8.0/emails"; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", datatype: "json", url: oDataSelect, data: jsonEntity, async: false, beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); XMLHttpRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8"); XMLHttpRequest.setRequestHeader("Prefer", "odata.include-annotations=*"); }, success: function (data, textStatus, XmlHttpRequest) { alert("success"); }, error: function (xmlHttpRequest, textStatus, errorThrown) { alert("Status: " + textStatus + "; ErrorThrown: " + errorThrown); } });



  • Community Member Profile Picture
    on at
    RE: How to create a link dynamically in Description of Email activity?

    Thanks for reply!

    I'm not getting any link. It gives me just text.

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at
    RE: How to create a link dynamically in Description of Email activity?

    Hi,

    Can you please provide code for creating this email.

    Moreover have you used hyperlink tag in you script to create link as email body always supports html tags as it takes it as html by default.

    Hope this helps:)

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    RE: How to create a link dynamically in Description of Email activity?

    Hi,

    You can simply use html tags to make hyperlink while setting email description and it will be rendered as link

    <a href="www.microsoft.com/">Microsoft</a>

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans