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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Javascript to open email

(0) ShareShare
ReportReport
Posted on by 244

EntityRelation: Course - participant(Grid)- Contact

I have placed a button on Grid to get selected items on button click and from there open an email with the preloaded contacts in the to field.

Contact is alookup on Participant, so before adding the contact to party list i need to retrieve the contact based on the participant.

I have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    [deleted]
  • NK Bhairi Profile Picture
    244 on at

    Removed 

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    [deleted]
  • NK Bhairi Profile Picture
    244 on at

    No its not working,

    and yo have pasted the same code

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    [deleted]
  • NK Bhairi Profile Picture
    244 on at

    when you posted something as an Answer, everyone in the world will think that you have knowledge on that.

    I clearly told you where exactly the issue is in the code you posted.

    Nevertheless, being a developer I was curious if you have posted something with Fix (which is the same code), you must have tried that.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    I will not argue. Good luck solving your issue.

  • Suggested answer
    sdfasdf Profile Picture
    842 on at

    Hello,

    I believe this can be easily achieved with custom JavaScript code. In order to simplify the scenario, maybe the best approach is for your JavaScript code to actually create the email record with all the necessary information using the WebAPI, and then just use the openForm function to open the email record.

    Please refer to this article which walks you through how to create an email record with WebAPI: community.dynamics.com/.../creating-an-email-activity-in-ms-crm-through-webapi

    I hope you find this information useful.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 107 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 92

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans