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 :
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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 29 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans