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);
No comments:
Post a Comment