Open Windows Email App with To, CC and BCC information from Dynamics

In this blog, we are going see how we can open a windows email app with information from Dynamics CRM.

Problem Statement:  As we all know, when we click that little icon on Email field, it open our windows mail app. One of our client, wanted to have that feature with CC and BCC information as well. And this is not supported by OOB feature.


To achieve this particular functionality, I have overridden the OOB functionality. Let's see, step by step, how I did it.

First of all, find "data-id" for your email field. It is unique for each control. You can find it by Inspect on Email icon of your field.


Create a HTML web resource which overrides the Email icon click functionality. Click here to download the complete code file. 


Add this as a component on CRM form. Just make sure, you have this component added in somewhere at the top section of the form as web resource needed to be loaded and also set height as only 1 row so that it would not eat more space.


To call the function inside HTML, we have to create JavaScript logic and attach event to the form. Click here to download the complete code file.


Attach the OnLoad function to "form onload" event and EmailFieldOnChange function to "on change" events of To, CC and BCC fields.
That's it. Save and Publish the changes.

Note:- You can add subject and body Information for the mail as well. Refer Microsoft Docs for the same.

And here is the result:

Comments

Popular posts from this blog

Check Webresource Dependencies on form

Create a System Dashboard from a Personalized Dashboard