MS CRM 2011/2013: Open new email form with To and Regarding fields prefilled
Views (4483)
About a year ago I wrote small article how to open new activity form with Regarding field prefilled.
This week I had a similar task but this time I had to write a JavaScript that will open email form with To field prefilled. So here is the script that you can use:
Here is sample of usage:
This small JavaScript will open new email form with Regarding and To fields prefilled with contact with Id that equals to "c8576fa9-155e-e311-bbc5-6c3be5a8d218".
This week I had a similar task but this time I had to write a JavaScript that will open email form with To field prefilled. So here is the script that you can use:
function OpenEmail(recordid, recordtypecode) {
var params = "pId=" + recordid + "&pName=&pType=" + recordtypecode;
params += "&partyid=" + recordid + "&partyname=&partytype=" + recordtypecode;
var url = "/main.aspx?etc=4202&pagetype=entityrecord&extraqs=" + encodeURIComponent(params);
url = Xrm.Page.context.prependOrgName(url);
window.open(url);
}
OpenEmail("c8576fa9-155e-e311-bbc5-6c3be5a8d218", 2);This was originally posted here.

Like
Report
*This post is locked for comments