RE: Open an Email Template after click on a button
This is done, thanks for help.
One more thing want to know i added some fields in body of that template.
So how could i pass them?
Code is given below--->
function LoadTemplate() {
// Check the form type should be 'create' type
var unit = Xrm.Page.getAttribute("new_first_escalation").getValue();
if(unit==true)
{
var parameters = {};
parameters["templateid"] = "2c2c7d8d-2813-e911-a969-000d3af03194"; // Guid of Email Template
parameters["templateidname"] = "Case Escalation";
parameters["_CreateFromType"] = "112";
/*parameters["body"] = "<?xml version="1.0" ?><xsl:stylesheet xmlns:xsl="www.w3.org/.../Transform" version="1.0"><xsl:output method="text" indent="no"></xsl:output><xsl:template match="/data"><![CDATA[]]><xsl:choose><xsl:when test="incident/title"><xsl:value-of select="incident/title" ></xsl:value></xsl:when><xsl:when test="incident/new_timerstatus"><xsl:value-of select="incident/new_timerstatus" ></xsl:value></xsl:when><xsl:when test="incident/new_first_escalation/@name"><xsl:value-of select="incident/new_first_escalation/@name" ></xsl:value></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose><![CDATA[ <font face="Tahoma, Verdana, Arial" size=2 style="display:inline;"></font>]]></xsl:template></xsl:stylesheet>";*/
var windowOptions = { openInNewWindow: true};
parameters["subject"] = "Regarding Case Escalation ";
//parameters["templateidtype"] = "template";
Xrm.Utility.openEntityForm("email", null, parameters,windowOptions );
}
}