diff --git a/src/XrmMockup365/Core.cs b/src/XrmMockup365/Core.cs index bc369704..e2c9ae1d 100644 --- a/src/XrmMockup365/Core.cs +++ b/src/XrmMockup365/Core.cs @@ -437,6 +437,7 @@ private void InitializeDB() new InitializeFileBlocksDownloadRequestHandler(this, db, metadata, security), new DownloadBlockRequestHandler(this, db, metadata, security), new InstantiateTemplateRequestHandler(this, db, metadata, security), + new SendEmailFromTemplateRequestHandler(this, db, metadata, security), new CreateMultipleRequestHandler(this, db, metadata, security), new UpdateMultipleRequestHandler(this, db, metadata, security), new DeleteMultipleRequestHandler(this, db, metadata, security), diff --git a/src/XrmMockup365/Internal/EmailTemplateRenderer.cs b/src/XrmMockup365/Internal/EmailTemplateRenderer.cs new file mode 100644 index 00000000..fb6d032f --- /dev/null +++ b/src/XrmMockup365/Internal/EmailTemplateRenderer.cs @@ -0,0 +1,124 @@ +using Microsoft.Xrm.Sdk; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Xml; +using System.Xml.Xsl; + +namespace DG.Tools.XrmMockup +{ + /// + /// Renders Dynamics e-mail template content. In Dataverse a template's subject and + /// body attributes are XSLT stylesheets (method="text") that transform a + /// <data> document built from the records the e-mail draws from (the regarding + /// record and the sending user). This reproduces that mechanism so the merged text matches + /// what the platform produces. + /// + internal static class EmailTemplateRenderer + { + /// + /// Renders a single template field (subject or body). + /// + /// The raw template attribute value (an XSLT stylesheet in Dataverse). + /// + /// The records available to the template, keyed by logical name. Each becomes a child of + /// <data> (e.g. <contact>, <systemuser>) with one + /// element per populated attribute. + /// + /// + /// The merged text. If the field is not an XSLT stylesheet, or the transform fails, the + /// raw value is returned unchanged so plain-text templates still work. + /// + public static string Render(string templateField, IReadOnlyDictionary entitiesByLogicalName) + { + if (string.IsNullOrWhiteSpace(templateField)) + return templateField; + + // Real Dataverse templates are XSLT. Anything else is treated as literal text. + if (templateField.IndexOf("xsl:stylesheet", StringComparison.OrdinalIgnoreCase) < 0) + return templateField; + + try + { + var transform = new XslCompiledTransform(); + using (var stringReader = new StringReader(templateField)) + using (var xsltReader = XmlReader.Create(stringReader)) + { + // Default XsltSettings: scripts and the document() function are disabled. + transform.Load(xsltReader); + } + + var dataDocument = BuildDataDocument(entitiesByLogicalName); + + using (var writer = new StringWriter(CultureInfo.InvariantCulture)) + { + transform.Transform(dataDocument, null, writer); + return writer.ToString(); + } + } + catch (Exception e) when (e is XmlException || e is XsltException) + { + // Not valid XSLT - fall back to the raw value rather than failing the send. + return templateField; + } + } + + private static XmlDocument BuildDataDocument(IReadOnlyDictionary entitiesByLogicalName) + { + var document = new XmlDocument(); + var dataElement = document.CreateElement("data"); + document.AppendChild(dataElement); + + if (entitiesByLogicalName == null) + return document; + + foreach (var pair in entitiesByLogicalName) + { + if (pair.Value == null || string.IsNullOrEmpty(pair.Key)) + continue; + + var entityElement = document.CreateElement(pair.Key); + dataElement.AppendChild(entityElement); + + foreach (var attribute in pair.Value.Attributes) + { + var text = AttributeToString(attribute.Value); + if (string.IsNullOrEmpty(text)) + continue; + + var attributeElement = document.CreateElement(attribute.Key); + attributeElement.InnerText = text; + entityElement.AppendChild(attributeElement); + } + } + + return document; + } + + private static string AttributeToString(object value) + { + switch (value) + { + case null: + return null; + case string s: + return s; + case EntityReference reference: + return reference.Name; + case OptionSetValue optionSet: + return optionSet.Value.ToString(CultureInfo.InvariantCulture); + case Money money: + return money.Value.ToString(CultureInfo.InvariantCulture); + case bool boolean: + return boolean ? "True" : "False"; + case DateTime dateTime: + return dateTime.ToString(CultureInfo.InvariantCulture); + case IFormattable formattable: + return formattable.ToString(null, CultureInfo.InvariantCulture); + default: + return value.ToString(); + } + } + } +} diff --git a/src/XrmMockup365/Requests/SendEmailFromTemplateRequestHandler.cs b/src/XrmMockup365/Requests/SendEmailFromTemplateRequestHandler.cs new file mode 100644 index 00000000..e3e22a16 --- /dev/null +++ b/src/XrmMockup365/Requests/SendEmailFromTemplateRequestHandler.cs @@ -0,0 +1,89 @@ +using DG.Tools.XrmMockup.Database; +using Microsoft.Crm.Sdk.Messages; +using Microsoft.Xrm.Sdk; +using Microsoft.Xrm.Sdk.Messages; +using System; +using System.Collections.Generic; +using System.ServiceModel; + +namespace DG.Tools.XrmMockup +{ + internal class SendEmailFromTemplateRequestHandler : RequestHandler + { + public SendEmailFromTemplateRequestHandler(Core core, XrmDb db, MetadataSkeleton metadata, Security security) : base(core, db, metadata, security, "SendEmailFromTemplate") { } + + // Dataverse throws when a referenced record does not exist; mirror that rather than + // silently sending an empty/unmerged e-mail. + private Entity RetrieveOrThrow(EntityReference reference) + { + return db.GetEntityOrNull(reference) + ?? throw new FaultException($"{reference.LogicalName} With Id = {reference.Id} Does Not Exist"); + } + + // A template is bound to an entity type via templatetypecode (an object type code). + // Dataverse rejects a regarding record of a different type. + private void ValidateTemplateType(Entity template, string regardingType) + { + var templateTypeCode = (template.GetAttributeValue("templatetypecode"))?.Value + ?? template.GetAttributeValue("templatetypecode"); + metadata.EntityMetadata.TryGetValue(regardingType, out var regardingMetadata); + var regardingTypeCode = regardingMetadata?.ObjectTypeCode; + + if (templateTypeCode.HasValue && regardingTypeCode.HasValue && + templateTypeCode.Value != regardingTypeCode.Value) + { + throw new FaultException( + $"The template type does not match the regarding object type '{regardingType}'."); + } + } + + internal override OrganizationResponse Execute(OrganizationRequest orgRequest, EntityReference userRef) + { + var request = MakeRequest(orgRequest); + + if (request.TemplateId == Guid.Empty) + throw new FaultException("Template id should be set."); + + if (request.Target == null) + throw new FaultException("Target email is missing."); + + if (request.Target.LogicalName != "email") + throw new FaultException("Target must be an email entity."); + + if (request.RegardingId == Guid.Empty) + throw new FaultException("Regarding id should be set."); + + if (string.IsNullOrEmpty(request.RegardingType)) + throw new FaultException("Regarding type should be set."); + + var template = RetrieveOrThrow(new EntityReference("template", request.TemplateId)); + var regardingRef = new EntityReference(request.RegardingType, request.RegardingId); + var regarding = RetrieveOrThrow(regardingRef); + + ValidateTemplateType(template, request.RegardingType); + + // The template's subject/body are XSLT stylesheets rendered against the regarding + // record and the sending user. Verified against a live org: the merged values (and + // XSLT whitespace handling) match the platform. + var entities = new Dictionary { [request.RegardingType] = regarding }; + var sender = db.GetEntityOrNull(userRef); + if (sender != null) + entities[sender.LogicalName] = sender; + + var email = request.Target; + email["regardingobjectid"] = regardingRef; + email["subject"] = EmailTemplateRenderer.Render(template.GetAttributeValue("subject"), entities); + email["description"] = EmailTemplateRenderer.Render(template.GetAttributeValue("body"), entities); + + // Delegate to the existing Create and SendEmail handlers so plugins, security + // and status transitions are applied consistently. + var emailId = ((CreateResponse)core.Execute(new CreateRequest { Target = email }, userRef)).id; + core.Execute(new SendEmailRequest { EmailId = emailId, IssueSend = true }, userRef); + + return new SendEmailFromTemplateResponse + { + Results = new ParameterCollection { { "Id", emailId } } + }; + } + } +} diff --git a/tests/TestPluginAssembly365/Context/Template.cs b/tests/TestPluginAssembly365/Context/Template.cs new file mode 100644 index 00000000..fc10599e --- /dev/null +++ b/tests/TestPluginAssembly365/Context/Template.cs @@ -0,0 +1,537 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Delegate XrmContext v3.0.1. +// +// Generated from the live org https://orgd3a12bfa.crm4.dynamics.com scoped to the +// 'template' entity. The main XrmContext.cs is generated from a different reference org +// that does not contain 'template', so this type is generated separately and kept here. +// +// Adjusted to match the existing XrmContext.cs style (which predates v3): the cosmetic +// [DisplayName]/[MaxLength]/[Range] annotations and their System.ComponentModel* usings were +// removed (net462 does not reference DataAnnotations and the existing context omits them), +// and the unused standalone Template_TemplateTypeCode option-set enum was dropped because +// 'templatetypecode' is an EntityName (string). The attribute data is otherwise unchanged. +// The 'componentstate' enum referenced below is defined in XrmContext.cs. +// +//------------------------------------------------------------------------------ + +using DG.XrmContext; +using Microsoft.Xrm.Sdk; +using Microsoft.Xrm.Sdk.Client; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Linq.Expressions; +using System.Runtime.Serialization; + + +namespace DG.XrmFramework.BusinessDomain.ServiceContext { + + + /// + /// Template for an email message that contains the standard attributes of an email message. + /// Display Name: Email Template + /// + [EntityLogicalName("template")] + [DebuggerDisplay("{DebuggerDisplay,nq}")] + [DataContract()] + public partial class Template : ExtendedEntity { + + public const string EntityLogicalName = "template"; + + public const int EntityTypeCode = 2010; + + public Template() : + base(EntityLogicalName) { + } + + public Template(Guid Id) : + base(EntityLogicalName, Id) { + } + + private string DebuggerDisplay { + get { + return GetDebuggerDisplay("title"); + } + } + + [AttributeLogicalName("templateid")] + public override Guid Id { + get { + return base.Id; + } + set { + SetId("templateid", value); + } + } + + /// + /// Unique identifier of the template. + /// + [AttributeLogicalName("templateid")] + public Guid? TemplateId { + get { + return GetAttributeValue("templateid"); + } + set { + SetId("templateid", value); + } + } + + /// + /// Body text of the email template. + /// + [AttributeLogicalName("body")] + public string Body { + get { + return GetAttributeValue("body"); + } + set { + SetAttributeValue("body", value); + } + } + + /// + /// For internal use only. + /// + [AttributeLogicalName("componentstate")] + public componentstate? ComponentState { + get { + return GetOptionSetValue("componentstate"); + } + } + + /// + /// Unique identifier of the user who created the email template. + /// + [AttributeLogicalName("createdby")] + public EntityReference CreatedBy { + get { + return GetAttributeValue("createdby"); + } + } + + /// + /// Date and time when the email template was created. + /// + [AttributeLogicalName("createdon")] + public DateTime? CreatedOn { + get { + return GetAttributeValue("createdon"); + } + } + + /// + /// Unique identifier of the delegate user who created the template. + /// + [AttributeLogicalName("createdonbehalfby")] + public EntityReference CreatedOnBehalfBy { + get { + return GetAttributeValue("createdonbehalfby"); + } + } + + /// + /// Description of the email template. + /// + [AttributeLogicalName("description")] + public string Description { + get { + return GetAttributeValue("description"); + } + set { + SetAttributeValue("description", value); + } + } + + [AttributeLogicalName("entityimageid")] + public Guid? EntityImageId { + get { + return GetAttributeValue("entityimageid"); + } + } + + /// + /// For internal use only. + /// + [AttributeLogicalName("generationtypecode")] + public int? GenerationTypeCode { + get { + return GetAttributeValue("generationtypecode"); + } + set { + SetAttributeValue("generationtypecode", value); + } + } + + /// + /// Unique identifier of the data import or data migration that created this record. + /// + [AttributeLogicalName("importsequencenumber")] + public int? ImportSequenceNumber { + get { + return GetAttributeValue("importsequencenumber"); + } + set { + SetAttributeValue("importsequencenumber", value); + } + } + + /// + /// Version in which the form is introduced. + /// + [AttributeLogicalName("introducedversion")] + public string IntroducedVersion { + get { + return GetAttributeValue("introducedversion"); + } + set { + SetAttributeValue("introducedversion", value); + } + } + + /// + /// Information that specifies whether this component can be customized. + /// + [AttributeLogicalName("iscustomizable")] + public BooleanManagedProperty IsCustomizable { + get { + return GetAttributeValue("iscustomizable"); + } + set { + SetAttributeValue("iscustomizable", value); + } + } + + /// + /// Indicates whether the solution component is part of a managed solution. + /// + [AttributeLogicalName("ismanaged")] + public bool? IsManaged { + get { + return GetAttributeValue("ismanaged"); + } + } + + /// + /// Information about whether the template is personal or is available to all users. + /// + [AttributeLogicalName("ispersonal")] + public bool? IsPersonal { + get { + return GetAttributeValue("ispersonal"); + } + set { + SetAttributeValue("ispersonal", value); + } + } + + /// + /// Indicates if a template is recommended by Dynamics 365. + /// + [AttributeLogicalName("isrecommended")] + public bool? IsRecommended { + get { + return GetAttributeValue("isrecommended"); + } + } + + /// + /// Language of the email template. + /// + [AttributeLogicalName("languagecode")] + public int? LanguageCode { + get { + return GetAttributeValue("languagecode"); + } + set { + SetAttributeValue("languagecode", value); + } + } + + /// + /// MIME type of the email template. + /// + [AttributeLogicalName("mimetype")] + public string MimeType { + get { + return GetAttributeValue("mimetype"); + } + set { + SetAttributeValue("mimetype", value); + } + } + + /// + /// Unique identifier of the user who last modified the template. + /// + [AttributeLogicalName("modifiedby")] + public EntityReference ModifiedBy { + get { + return GetAttributeValue("modifiedby"); + } + } + + /// + /// Date and time when the email template was last modified. + /// + [AttributeLogicalName("modifiedon")] + public DateTime? ModifiedOn { + get { + return GetAttributeValue("modifiedon"); + } + } + + /// + /// Unique identifier of the delegate user who last modified the template. + /// + [AttributeLogicalName("modifiedonbehalfby")] + public EntityReference ModifiedOnBehalfBy { + get { + return GetAttributeValue("modifiedonbehalfby"); + } + } + + /// + /// For internal use only. Shows the number of times emails that use this template have been opened. + /// + [AttributeLogicalName("opencount")] + public int? OpenCount { + get { + return GetAttributeValue("opencount"); + } + } + + /// + /// Shows the open rate of this template. This is based on number of opens on followed emails that use this template. + /// + [AttributeLogicalName("openrate")] + public int? OpenRate { + get { + return GetAttributeValue("openrate"); + } + } + + /// + /// For internal use only. + /// + [AttributeLogicalName("overwritetime")] + public DateTime? OverwriteTime { + get { + return GetAttributeValue("overwritetime"); + } + } + + /// + /// Unique identifier of the user or team who owns the template for the email activity. + /// + [AttributeLogicalName("ownerid")] + public EntityReference OwnerId { + get { + return GetAttributeValue("ownerid"); + } + set { + SetAttributeValue("ownerid", value); + } + } + + /// + /// Unique identifier of the business unit that owns the template. + /// + [AttributeLogicalName("owningbusinessunit")] + public EntityReference OwningBusinessUnit { + get { + return GetAttributeValue("owningbusinessunit"); + } + } + + /// + /// Unique identifier of the team who owns the template. + /// + [AttributeLogicalName("owningteam")] + public EntityReference OwningTeam { + get { + return GetAttributeValue("owningteam"); + } + } + + /// + /// Unique identifier of the user who owns the template. + /// + [AttributeLogicalName("owninguser")] + public EntityReference OwningUser { + get { + return GetAttributeValue("owninguser"); + } + } + + /// + /// XML data for the body of the email template. + /// + [AttributeLogicalName("presentationxml")] + public string PresentationXml { + get { + return GetAttributeValue("presentationxml"); + } + set { + SetAttributeValue("presentationxml", value); + } + } + + /// + /// Title of the template. + /// + [AttributeLogicalName("title")] + public string PrimaryNameField { + get { + return GetAttributeValue("title"); + } + set { + SetAttributeValue("title", value); + } + } + + /// + /// For internal use only. Shows the number of times emails that use this template have received replies. + /// + [AttributeLogicalName("replycount")] + public int? ReplyCount { + get { + return GetAttributeValue("replycount"); + } + } + + /// + /// Shows the reply rate for this template. This is based on number of replies received on followed emails that use this template. + /// + [AttributeLogicalName("replyrate")] + public int? ReplyRate { + get { + return GetAttributeValue("replyrate"); + } + } + + /// + /// Safe html of email template. + /// + [AttributeLogicalName("safehtml")] + public string SafeHtml { + get { + return GetAttributeValue("safehtml"); + } + set { + SetAttributeValue("safehtml", value); + } + } + + /// + /// Unique identifier of the associated solution. + /// + [AttributeLogicalName("solutionid")] + public Guid? SolutionId { + get { + return GetAttributeValue("solutionid"); + } + } + + /// + /// Subject associated with the email template. + /// + [AttributeLogicalName("subject")] + public string Subject { + get { + return GetAttributeValue("subject"); + } + set { + SetAttributeValue("subject", value); + } + } + + /// + /// XML data for the subject of the email template. + /// + [AttributeLogicalName("subjectpresentationxml")] + public string SubjectPresentationXml { + get { + return GetAttributeValue("subjectpresentationxml"); + } + set { + SetAttributeValue("subjectpresentationxml", value); + } + } + + /// + /// Safe html of email template subject. + /// + [AttributeLogicalName("subjectsafehtml")] + public string SubjectSafeHtml { + get { + return GetAttributeValue("subjectsafehtml"); + } + set { + SetAttributeValue("subjectsafehtml", value); + } + } + + /// + /// For internal use only. + /// + [AttributeLogicalName("templateidunique")] + public Guid? TemplateIdUnique { + get { + return GetAttributeValue("templateidunique"); + } + } + + /// + /// Type of email template. + /// + [AttributeLogicalName("templatetypecode")] + public string TemplateTypeCode { + get { + return GetAttributeValue("templatetypecode"); + } + set { + SetAttributeValue("templatetypecode", value); + } + } + + /// + /// Title of the template. + /// + [AttributeLogicalName("title")] + public string Title { + get { + return GetAttributeValue("title"); + } + set { + SetAttributeValue("title", value); + } + } + + /// + /// Shows the number of sent emails that use this template. + /// + [AttributeLogicalName("usedcount")] + public int? UsedCount { + get { + return GetAttributeValue("usedcount"); + } + } + + /// + /// Version number of the template. + /// + [AttributeLogicalName("versionnumber")] + public long? VersionNumber { + get { + return GetAttributeValue("versionnumber"); + } + } + + public static Template Retrieve(IOrganizationService service, Guid id, params Expression>[] attrs) { + return service.Retrieve(id, attrs); + } + } +} diff --git a/tests/XrmMockup365Test/Metadata/TemplateMetadata.xml b/tests/XrmMockup365Test/Metadata/TemplateMetadata.xml new file mode 100644 index 00000000..328ade39 --- /dev/null +++ b/tests/XrmMockup365Test/Metadata/TemplateMetadata.xml @@ -0,0 +1,9074 @@ + + + + + + + + template + + b71c0a4c-b9b6-4e12-a02e-94feba67eade + + 0 + + + 79fce9cd-25b4-4d41-bf22-85670d2f70f2 + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 9 + 1900-01-01T00:00:00 + + + + + 1764cfee-2241-db11-898a-0007e9e17ebd + + true + Body text of the email template. + 1033 + + + + 1764cfee-2241-db11-898a-0007e9e17ebd + + true + Body text of the email template. + 1033 + + + + + + 1664cfee-2241-db11-898a-0007e9e17ebd + + true + Body + 1033 + + + + 1664cfee-2241-db11-898a-0007e9e17ebd + + true + Body + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + body + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + Body + + + MemoType + + 5.0.0.0 + false + + + TextArea + Auto + 1073741823 + + TextArea + + false + + + eb40fb38-f56c-43a2-9e4f-08fc4ae1374c + + + Picklist + false + false + false + + false + canmodifyadditionalsettings + false + + 38 + 1900-01-01T00:00:00 + + + + + 4bc15966-4061-4f84-96a5-5323a385d5b2 + + true + For internal use only. + 1033 + + + + 4bc15966-4061-4f84-96a5-5323a385d5b2 + + true + For internal use only. + 1033 + + + + + + 91a2c350-e738-484c-90df-13d406b28602 + + true + Component State + 1033 + + + + 91a2c350-e738-484c-90df-13d406b28602 + + true + Component State + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + componentstate + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + ComponentState + + + PicklistType + + 5.0.0.0 + false + 0 + + -1 + + faece09f-cefc-11de-8150-00155da18b00 + + + + + faece0a1-cefc-11de-8150-00155da18b00 + + true + The state of this component. + 1033 + + + + faece0a1-cefc-11de-8150-00155da18b00 + + true + The state of this component. + 1033 + + + + + + faece0a0-cefc-11de-8150-00155da18b00 + + true + Component State + 1033 + + + + faece0a0-cefc-11de-8150-00155da18b00 + + true + Component State + 1033 + + + + false + + false + iscustomizable + false + + true + true + componentstate + Picklist + 5.0.0.0 + + + + + + + + + + + false + true + + + + faece0a3-cefc-11de-8150-00155da18b00 + + true + Published + 1033 + + + + faece0a3-cefc-11de-8150-00155da18b00 + + true + Published + 1033 + + + + 0 + + + + + + + + + + + + false + true + + + + faece0a5-cefc-11de-8150-00155da18b00 + + true + Unpublished + 1033 + + + + faece0a5-cefc-11de-8150-00155da18b00 + + true + Unpublished + 1033 + + + + 1 + + + + + + + + + + + + false + true + + + + faece0a7-cefc-11de-8150-00155da18b00 + + true + Deleted + 1033 + + + + faece0a7-cefc-11de-8150-00155da18b00 + + true + Deleted + 1033 + + + + 2 + + + + + + + + + + + + false + true + + + + 1f83e0bb-cefd-11de-8150-00155da18b00 + + true + Deleted Unpublished + 1033 + + + + 1f83e0bb-cefd-11de-8150-00155da18b00 + + true + Deleted Unpublished + 1033 + + + + 3 + + + + + + + + 0 + + + + + 306d7cb9-fcd9-4d42-a400-2aa73bdea381 + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 13 + 1900-01-01T00:00:00 + + + + + fae9af0c-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the user who created the email template. + 1033 + + + + fae9af0c-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the user who created the email template. + 1033 + + + + + + f9e9af0c-2341-db11-898a-0007e9e17ebd + + true + Created By + 1033 + + + + f9e9af0c-2341-db11-898a-0007e9e17ebd + + true + Created By + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + createdby + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + CreatedBy + + + LookupType + + 5.0.0.0 + false + + + None + + systemuser + + + + d081bb4a-b92f-4790-9a1a-ef359a53b12b + + createdby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 20 + 1900-01-01T00:00:00 + + + + + 641d9b1e-2341-db11-898a-0007e9e17ebd + + true + Name of the user who created the email template. + 1033 + + + + 641d9b1e-2341-db11-898a-0007e9e17ebd + + true + Name of the user who created the email template. + 1033 + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + createdbyname + 2026-05-15T07:09:51.84 + + false + canmodifyrequirementlevelsettings + None + + CreatedByName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + + + Text + + + false + 0 + 320 + + + cdc10493-8106-4e96-943e-63732f539bc6 + + createdby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 35 + 1900-01-01T00:00:00 + + + + + 844f7b37-2341-db11-898a-0007e9e17ebd + + true + YomiName of the user who created the email template. + 1033 + + + + 844f7b37-2341-db11-898a-0007e9e17ebd + + true + YomiName of the user who created the email template. + 1033 + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + createdbyyominame + 2026-05-15T07:09:54.5900032 + + false + canmodifyrequirementlevelsettings + None + + CreatedByYomiName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + createdbyname + + Text + + + false + 0 + 320 + + + 52ae0715-5eb5-4f2d-a168-2c5662d7db58 + + + DateTime + false + false + false + + false + canmodifyadditionalsettings + false + + 15 + 1900-01-01T00:00:00 + + + + + e026e7d6-2241-db11-898a-0007e9e17ebd + + true + Date and time when the email template was created. + 1033 + + + + e026e7d6-2241-db11-898a-0007e9e17ebd + + true + Date and time when the email template was created. + 1033 + + + + + + df26e7d6-2241-db11-898a-0007e9e17ebd + + true + Created On + 1033 + + + + df26e7d6-2241-db11-898a-0007e9e17ebd + + true + Created On + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + createdon + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + CreatedOn + + + DateTimeType + + 5.0.0.0 + false + 0 + + DateAndTime + Inactive + + 0 + + false + canmodifybehavior + false + + + UserLocal + + + + 5a0a7aed-dfa0-44bb-98a9-137892bd4b64 + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 42 + 1900-01-01T00:00:00 + + + + + e5054e1c-47a1-49c9-ace2-f8fb0fd46082 + + true + Unique identifier of the delegate user who created the template. + 1033 + + + + e5054e1c-47a1-49c9-ace2-f8fb0fd46082 + + true + Unique identifier of the delegate user who created the template. + 1033 + + + + + + 9eb18cf1-f226-420c-b1aa-de8699755ad7 + + true + Created By (Delegate) + 1033 + + + + 9eb18cf1-f226-420c-b1aa-de8699755ad7 + + true + Created By (Delegate) + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + createdonbehalfby + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + CreatedOnBehalfBy + + + LookupType + + 5.0.0.0 + false + + + None + + systemuser + + + + 0b21e731-bd3f-4b46-b06a-6a89451eb724 + + createdonbehalfby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 44 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + createdonbehalfbyname + 2026-05-15T07:09:52.6200064 + + false + canmodifyrequirementlevelsettings + None + + CreatedOnBehalfByName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + + + Text + + + false + 0 + 320 + + + 013aa3f5-81ae-4be8-82b0-e0ec18bded64 + + createdonbehalfby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 45 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + createdonbehalfbyyominame + 2026-05-15T07:09:54.5430016 + + false + canmodifyrequirementlevelsettings + None + + CreatedOnBehalfByYomiName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + createdonbehalfbyname + + Text + + + false + 0 + 320 + + + db3dce49-6363-4130-9617-4eaec35cf968 + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 11 + 1900-01-01T00:00:00 + + + + + f51dd7e8-2241-db11-898a-0007e9e17ebd + + true + Description of the email template. + 1033 + + + + f51dd7e8-2241-db11-898a-0007e9e17ebd + + true + Description of the email template. + 1033 + + + + + + f41dd7e8-2241-db11-898a-0007e9e17ebd + + true + Description + 1033 + + + + f41dd7e8-2241-db11-898a-0007e9e17ebd + + true + Description + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + false + true + true + true + + description + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + Description + + + MemoType + + 5.0.0.0 + false + + + Text + Auto + 2000 + + Text + + false + + + aecaf2b0-2d87-475a-b79f-780180a641a9 + + entityimageid + Virtual + false + false + false + + true + canmodifyadditionalsettings + false + + 10006 + 2026-05-15T11:47:35.0230016 + + + + + 9672d2e2-f6cd-4c69-95eb-59a7f6e4e545 + + false + Shows the default image for the record. + 1033 + + + + 9672d2e2-f6cd-4c69-95eb-59a7f6e4e545 + + false + Shows the default image for the record. + 1033 + + + + + + 29278ef8-c857-4d1a-bdd3-6aa424f3b46a + + false + Default Image + 1033 + + + + 29278ef8-c857-4d1a-bdd3-6aa424f3b46a + + false + Default Image + 1033 + + + template + + + + true + canmodifyauditsettings + false + + false + + true + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + false + false + false + + true + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + entityimage + 2026-05-15T11:47:35.0230016 + + false + canmodifyrequirementlevelsettings + None + + EntityImage + + + ImageType + + 6.0.0.0 + true + + + false + true + 144 + 10240 + 144 + + + 0cf9348a-810c-4dda-8e8e-dd6370b7cc55 + + entityimageid + BigInt + false + false + false + + false + canmodifyadditionalsettings + false + + 10005 + 2026-05-15T11:47:35.0070016 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + entityimage_timestamp + 2026-05-15T11:47:35.0070016 + + false + canmodifyrequirementlevelsettings + None + + EntityImage_Timestamp + + + BigIntType + + 6.0.0.0 + true + + + 9223372036854775807 + -9223372036854775808 + + + 73432d91-0418-4e0f-b5b6-1d6eb0902f7c + + entityimageid + String + false + false + false + + false + canmodifyadditionalsettings + false + + 10004 + 2026-05-15T11:47:34.9769984 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + true + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + entityimage_url + 2026-05-15T11:47:34.9769984 + + false + canmodifyrequirementlevelsettings + None + + EntityImage_URL + + + StringType + + 6.0.0.0 + true + 0 + + Url + Disabled + 200 + + + Url + + + false + 0 + 400 + + + ff9785d6-38f2-44e6-879c-268e576307c7 + + + Uniqueidentifier + false + false + false + + false + canmodifyadditionalsettings + false + + 10003 + 2026-05-15T11:47:34.96 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + entityimageid + 2026-05-15T11:47:34.96 + + false + canmodifyrequirementlevelsettings + None + + EntityImageId + + + UniqueidentifierType + + 6.0.0.0 + false + + + + + 66579e47-a3d5-46ff-837a-42eb6ada5a93 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 31 + 1900-01-01T00:00:00 + + + + + b051c19b-998c-4a98-a376-68ed18cd3cd2 + + true + For internal use only. + 1033 + + + + b051c19b-998c-4a98-a376-68ed18cd3cd2 + + true + For internal use only. + 1033 + + + + + + e64bf18c-0efa-4699-84fb-0fc5b604b5b9 + + true + Generation Type Code + 1033 + + + + e64bf18c-0efa-4699-84fb-0fc5b604b5b9 + + true + Generation Type Code + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + false + true + + generationtypecode + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + GenerationTypeCode + + + IntegerType + + 5.0.0.0 + false + 0 + + None + 2147483647 + 0 + + 0 + + + 18460bd9-edf0-4569-afda-295beb33c54c + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 33 + 1900-01-01T00:00:00 + + + + + 8fcc9305-da95-40e1-b2c7-bee1c744f5e9 + + true + Unique identifier of the data import or data migration that created this record. + 1033 + + + + 8fcc9305-da95-40e1-b2c7-bee1c744f5e9 + + true + Unique identifier of the data import or data migration that created this record. + 1033 + + + + + + 2a4e2f19-926c-4fa9-9c54-5a88b05d8fcf + + true + Import Sequence Number + 1033 + + + + 2a4e2f19-926c-4fa9-9c54-5a88b05d8fcf + + true + Import Sequence Number + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + false + true + false + true + + importsequencenumber + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + ImportSequenceNumber + + + IntegerType + + 5.0.0.0 + false + 0 + + None + 2147483647 + -2147483648 + + 0 + + + 2edff88a-365e-4356-b2e8-43f357726d8c + + + String + false + false + false + + false + canmodifyadditionalsettings + false + + 54 + 1900-01-01T00:00:00 + + + + + 309a3bef-56fb-439a-89d8-629e356a1ce7 + + true + Version in which the form is introduced. + 1033 + + + + 309a3bef-56fb-439a-89d8-629e356a1ce7 + + true + Version in which the form is introduced. + 1033 + + + + + + 8f611973-b29a-4e31-92a2-11c7490d3b17 + + true + Introduced Version + 1033 + + + + 8f611973-b29a-4e31-92a2-11c7490d3b17 + + true + Introduced Version + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + false + true + + introducedversion + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + IntroducedVersion + + + StringType + + 6.0.0.0 + false + 0 + + VersionNumber + Auto + 48 + + + VersionNumber + + + false + 0 + 96 + + + 370865d2-b62f-4154-a5a1-4e0d6c8f7ff8 + + + ManagedProperty + false + false + false + + false + canmodifyadditionalsettings + false + + 52 + 1900-01-01T00:00:00 + + + + + 4c46c780-c44a-4fbe-852e-74b361f7ecd7 + + true + Information that specifies whether this component can be customized. + 1033 + + + + 4c46c780-c44a-4fbe-852e-74b361f7ecd7 + + true + Information that specifies whether this component can be customized. + 1033 + + + + + + bc14ca4b-8d45-44a7-8c7d-5e11d10d8fb3 + + true + Customizable + 1033 + + + + bc14ca4b-8d45-44a7-8c7d-5e11d10d8fb3 + + true + Customizable + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + iscustomizable + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + IsCustomizable + + + ManagedPropertyType + + 5.0.0.0 + false + + + iscustomizableanddeletable + + 0 + Boolean + + + 9388702d-5f84-4cd5-8f00-b399429a15f7 + + + Boolean + false + false + false + + false + canmodifyadditionalsettings + false + + 51 + 1900-01-01T00:00:00 + + + + + 3cd2b49b-1704-4d71-8da2-4d3620ca3250 + + true + Indicates whether the solution component is part of a managed solution. + 1033 + + + + 3cd2b49b-1704-4d71-8da2-4d3620ca3250 + + true + Indicates whether the solution component is part of a managed solution. + 1033 + + + + + + 2a19ef4d-5a11-4749-9386-8f281126a77d + + true + Is Managed + 1033 + + + + 2a19ef4d-5a11-4749-9386-8f281126a77d + + true + Is Managed + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + ismanaged + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + IsManaged + + + BooleanType + + 5.0.0.0 + false + 0 + + false + + 9d04e035-5408-4c1d-a5aa-20445a02f691 + + + + + b41954a2-f3a5-47e9-ae13-ceb49de4465b + + true + Information about whether the current component is managed. + 1033 + + + + b41954a2-f3a5-47e9-ae13-ceb49de4465b + + true + Information about whether the current component is managed. + 1033 + + + + + + 45a188b1-91a8-4019-b582-cebda8081064 + + true + Is Component Managed + 1033 + + + + 45a188b1-91a8-4019-b582-cebda8081064 + + true + Is Component Managed + 1033 + + + + false + + false + iscustomizable + false + + true + true + ismanaged + Boolean + 5.0.0.0 + + + + + + + + + + false + true + + + + 443c7078-b7cb-47e7-8547-08dfa82950d0 + + true + Unmanaged + 1033 + + + + 443c7078-b7cb-47e7-8547-08dfa82950d0 + + true + Unmanaged + 1033 + + + + 0 + + + + + + + + + + + + false + true + + + + ec886b5b-7e97-4c62-b30c-bf295639d540 + + true + Managed + 1033 + + + + ec886b5b-7e97-4c62-b30c-bf295639d540 + + true + Managed + 1033 + + + + 1 + + + + + 0 + + + 8748c5d2-3c6f-46e1-bc9b-e422580e9222 + + ismanaged + Virtual + false + false + false + + false + canmodifyadditionalsettings + false + + 53 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + ismanagedname + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + IsManagedName + + + VirtualType + + 5.0.0.0 + true + + + + + bd6cc13d-c4f6-4d08-b344-eff79adce1b7 + + + Boolean + false + false + false + + false + canmodifyadditionalsettings + false + + 4 + 1900-01-01T00:00:00 + + + + + becde1dc-2241-db11-898a-0007e9e17ebd + + true + Information about whether the template is personal or is available to all users. + 1033 + + + + becde1dc-2241-db11-898a-0007e9e17ebd + + true + Information about whether the template is personal or is available to all users. + 1033 + + + + + + bdcde1dc-2241-db11-898a-0007e9e17ebd + + true + Viewable By + 1033 + + + + bdcde1dc-2241-db11-898a-0007e9e17ebd + + true + Viewable By + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + true + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + true + true + true + true + + ispersonal + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + IsPersonal + + + BooleanType + + 5.0.0.0 + false + 0 + + true + + 692312cf-56a6-4e49-b23e-9102ff0f67ca + + + + + 2c800910-9d68-43da-a9be-89be5d0e076c + + true + Information about whether the template is personal or is available to all users. + 1033 + + + + 2c800910-9d68-43da-a9be-89be5d0e076c + + true + Information about whether the template is personal or is available to all users. + 1033 + + + + + + e1f336db-1848-48b0-8f61-7cad82130b34 + + true + Viewable By + 1033 + + + + e1f336db-1848-48b0-8f61-7cad82130b34 + + true + Viewable By + 1033 + + + + false + + false + iscustomizable + true + + false + true + template_ispersonal + Boolean + 5.0.0.0 + + + + + + + + + + false + true + + + + c0cde1dc-2241-db11-898a-0007e9e17ebd + + true + Organization + 1033 + + + + c0cde1dc-2241-db11-898a-0007e9e17ebd + + true + Organization + 1033 + + + + 0 + + + + + + + + + + + + false + true + + + + c2cde1dc-2241-db11-898a-0007e9e17ebd + + true + Individual + 1033 + + + + c2cde1dc-2241-db11-898a-0007e9e17ebd + + true + Individual + 1033 + + + + 1 + + + + + 0 + + + 0402f0d0-9dba-4af5-9587-9b7804f24285 + + ispersonal + Virtual + false + false + false + + false + canmodifyadditionalsettings + false + + 28 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + ispersonalname + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + IsPersonalName + + + VirtualType + + 5.0.0.0 + true + + + + + ce62e4df-044d-4caf-afca-31a42b8eb898 + + + Boolean + false + false + false + + false + canmodifyadditionalsettings + true + + 57 + 1900-01-01T00:00:00 + + + + + 34af6216-41cf-4336-9a7e-264f8f75f285 + + true + Indicates if a template is recommended by Dynamics 365. + 1033 + + + + 34af6216-41cf-4336-9a7e-264f8f75f285 + + true + Indicates if a template is recommended by Dynamics 365. + 1033 + + + + + + 75fcdf03-cc45-4f96-85ca-5f5c06745165 + + true + Recommended + 1033 + + + + 75fcdf03-cc45-4f96-85ca-5f5c06745165 + + true + Recommended + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + true + canmodifysearchsettings + true + + false + true + true + true + false + true + + isrecommended + 1900-01-01T00:00:00 + + true + canmodifyrequirementlevelsettings + None + + IsRecommended + + + BooleanType + + 8.2.0.0 + false + 0 + + false + + 566c3f11-fd9e-4fe5-8535-f81d07cb0b9e + + + + + d2ec89bb-142c-4c03-bde1-8640bfa6c185 + + true + Shows if this template is recommended or not + 1033 + + + + d2ec89bb-142c-4c03-bde1-8640bfa6c185 + + true + Shows if this template is recommended or not + 1033 + + + + + + da2d5600-b73b-4bf4-96e3-1cffca697255 + + true + Recommended + 1033 + + + + da2d5600-b73b-4bf4-96e3-1cffca697255 + + true + Recommended + 1033 + + + + false + + false + iscustomizable + false + + false + true + template_isrecommended + Boolean + 8.2.0.0 + + + + + + + + + + false + true + + + + 09409285-2d68-49f1-959c-e2d873f07fda + + true + No + 1033 + + + + 09409285-2d68-49f1-959c-e2d873f07fda + + true + No + 1033 + + + + 0 + + + + + + + + + + + + false + true + + + + 1802c1b4-80f4-4408-a536-c08efb4baf0b + + true + Yes + 1033 + + + + 1802c1b4-80f4-4408-a536-c08efb4baf0b + + true + Yes + 1033 + + + + 1 + + + + + 0 + + + bda7101f-2d74-4bab-8201-650cca2e1bc3 + + isrecommended + Virtual + false + false + false + + false + canmodifyadditionalsettings + true + + 58 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + isrecommendedname + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + IsRecommendedName + + + VirtualType + + 8.2.0.0 + true + + + + + ba5e9a47-c78f-40b4-bc1b-1008326192a6 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 32 + 1900-01-01T00:00:00 + + + + + b99b1dc7-8e1e-4e1e-9b30-fc9e89322679 + + true + Language of the email template. + 1033 + + + + b99b1dc7-8e1e-4e1e-9b30-fc9e89322679 + + true + Language of the email template. + 1033 + + + + + + ae90bff0-065c-41f9-bc67-f316d9702a19 + + true + Language + 1033 + + + + ae90bff0-065c-41f9-bc67-f316d9702a19 + + true + Language + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + true + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + true + true + true + true + true + + languagecode + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + ApplicationRequired + + LanguageCode + + + IntegerType + + 5.0.0.0 + false + 0 + + Language + 2147483647 + 0 + + 0 + + + 1e90a39b-bda4-4ad2-b708-74ebcbcae348 + + + String + false + false + false + + false + canmodifyadditionalsettings + false + + 7 + 1900-01-01T00:00:00 + + + + + 6740b506-2341-db11-898a-0007e9e17ebd + + true + MIME type of the email template. + 1033 + + + + 6740b506-2341-db11-898a-0007e9e17ebd + + true + MIME type of the email template. + 1033 + + + + + + 6640b506-2341-db11-898a-0007e9e17ebd + + true + Mime Type + 1033 + + + + 6640b506-2341-db11-898a-0007e9e17ebd + + true + Mime Type + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + mimetype + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + MimeType + + + StringType + + 5.0.0.0 + false + 0 + + Text + Auto + 256 + + + Text + + + false + 0 + 512 + + + 53b62ff6-eb39-4c51-bc6c-63cff9bd3bb9 + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 16 + 1900-01-01T00:00:00 + + + + + 9b64cfee-2241-db11-898a-0007e9e17ebd + + true + Unique identifier of the user who last modified the template. + 1033 + + + + 9b64cfee-2241-db11-898a-0007e9e17ebd + + true + Unique identifier of the user who last modified the template. + 1033 + + + + + + 9a64cfee-2241-db11-898a-0007e9e17ebd + + true + Modified By + 1033 + + + + 9a64cfee-2241-db11-898a-0007e9e17ebd + + true + Modified By + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + modifiedby + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + ModifiedBy + + + LookupType + + 5.0.0.0 + false + + + None + + systemuser + + + + b58aae8b-25f3-4cf2-b724-1ee3e355949b + + modifiedby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 22 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + modifiedbyname + 2026-05-15T07:09:53.3699968 + + false + canmodifyrequirementlevelsettings + None + + ModifiedByName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + + + Text + + + false + 0 + 320 + + + f4645b25-ef5a-44c9-a347-34c01a8ae477 + + modifiedby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 34 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + modifiedbyyominame + 2026-05-15T07:09:54.8530048 + + false + canmodifyrequirementlevelsettings + None + + ModifiedByYomiName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + modifiedbyname + + Text + + + false + 0 + 320 + + + a51d5ce5-d73b-49ca-aeef-a0ee4536d2d2 + + + DateTime + false + false + false + + false + canmodifyadditionalsettings + false + + 17 + 1900-01-01T00:00:00 + + + + + 2640b506-2341-db11-898a-0007e9e17ebd + + true + Date and time when the email template was last modified. + 1033 + + + + 2640b506-2341-db11-898a-0007e9e17ebd + + true + Date and time when the email template was last modified. + 1033 + + + + + + 2540b506-2341-db11-898a-0007e9e17ebd + + true + Modified On + 1033 + + + + 2540b506-2341-db11-898a-0007e9e17ebd + + true + Modified On + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + modifiedon + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + ModifiedOn + + + DateTimeType + + 5.0.0.0 + false + 0 + + DateAndTime + Inactive + + 0 + + false + canmodifybehavior + false + + + UserLocal + + + + 2650518e-c42e-46d7-93ab-e8b2d4d10878 + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 46 + 1900-01-01T00:00:00 + + + + + 88b366f8-3717-4822-b29d-db05dd46efbc + + true + Unique identifier of the delegate user who last modified the template. + 1033 + + + + 88b366f8-3717-4822-b29d-db05dd46efbc + + true + Unique identifier of the delegate user who last modified the template. + 1033 + + + + + + 4a8a8e56-dbbd-4d19-88f0-eacd62cf24ce + + true + Modified By (Delegate) + 1033 + + + + 4a8a8e56-dbbd-4d19-88f0-eacd62cf24ce + + true + Modified By (Delegate) + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + modifiedonbehalfby + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + ModifiedOnBehalfBy + + + LookupType + + 5.0.0.0 + false + + + None + + systemuser + + + + 5edeb9b9-5fa4-40d7-bcb6-840485702594 + + modifiedonbehalfby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 48 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + modifiedonbehalfbyname + 2026-05-15T07:09:52.7129984 + + false + canmodifyrequirementlevelsettings + None + + ModifiedOnBehalfByName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + + + Text + + + false + 0 + 320 + + + fd623a4d-004c-4b78-82ea-a82aadb2aa65 + + modifiedonbehalfby + String + false + false + false + + false + canmodifyadditionalsettings + false + + 49 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + modifiedonbehalfbyyominame + 2026-05-15T07:09:54.7430016 + + false + canmodifyrequirementlevelsettings + None + + ModifiedOnBehalfByYomiName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + modifiedonbehalfbyname + + Text + + + false + 0 + 320 + + + 56b0f9b5-1482-46d8-9a80-72d55b7742e8 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 55 + 1900-01-01T00:00:00 + + + + + 92b43f6b-b037-4db6-8157-02b6418be326 + + true + For internal use only. Shows the number of times emails that use this template have been opened. + 1033 + + + + 92b43f6b-b037-4db6-8157-02b6418be326 + + true + For internal use only. Shows the number of times emails that use this template have been opened. + 1033 + + + + + + ecb78564-c1e7-408e-be5b-a0b85703f13e + + true + Open Count + 1033 + + + + ecb78564-c1e7-408e-be5b-a0b85703f13e + + true + Open Count + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + opencount + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + OpenCount + + + IntegerType + + 8.2.0.0 + false + 0 + + None + 2147483647 + 0 + + 0 + + + ea7970f2-1ac9-484a-b4d4-dced0a298f80 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 59 + 1900-01-01T00:00:00 + + + + + 445517b3-d409-4788-9ed5-60af9d105428 + + true + Shows the open rate of this template. This is based on number of opens on followed emails that use this template. + 1033 + + + + 445517b3-d409-4788-9ed5-60af9d105428 + + true + Shows the open rate of this template. This is based on number of opens on followed emails that use this template. + 1033 + + + + + + 86347fa3-64ac-4629-945e-88bce8f6070c + + true + Open Rate + 1033 + + + + 86347fa3-64ac-4629-945e-88bce8f6070c + + true + Open Rate + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + true + true + true + false + true + + openrate + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + OpenRate + + + IntegerType + + 8.2.0.0 + false + 0 + + None + 2147483647 + 0 + + 0 + + + 3fe1ef40-198d-4f89-81e4-c12aa4ea0720 + + + DateTime + false + false + false + + false + canmodifyadditionalsettings + false + + 37 + 1900-01-01T00:00:00 + + + + + 7b59ff51-01c5-42cf-949c-6a41d36f4fad + + true + For internal use only. + 1033 + + + + 7b59ff51-01c5-42cf-949c-6a41d36f4fad + + true + For internal use only. + 1033 + + + + + + cf4c1a13-ad1d-4c46-8b38-592926acebf8 + + true + Record Overwrite Time + 1033 + + + + cf4c1a13-ad1d-4c46-8b38-592926acebf8 + + true + Record Overwrite Time + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + overwritetime + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + OverwriteTime + + + DateTimeType + + 5.0.0.0 + false + 0 + + DateOnly + Inactive + + 0 + + false + canmodifybehavior + false + + + UserLocal + + + + 7aa12efe-ad5b-46dd-b155-750a5095564f + + + Owner + false + false + false + + false + canmodifyadditionalsettings + false + + 24 + 1900-01-01T00:00:00 + + + + + 4ed8dee2-2241-db11-898a-0007e9e17ebd + + true + Unique identifier of the user or team who owns the template for the email activity. + 1033 + + + + 4ed8dee2-2241-db11-898a-0007e9e17ebd + + true + Unique identifier of the user or team who owns the template for the email activity. + 1033 + + + + + + 4dd8dee2-2241-db11-898a-0007e9e17ebd + + true + Owner + 1033 + + + + 4dd8dee2-2241-db11-898a-0007e9e17ebd + + true + Owner + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + true + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + true + true + true + true + + ownerid + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + OwnerId + + + OwnerType + + 5.0.0.0 + false + + + None + + systemuser + team + + + + d9a30cad-6c8b-4dad-89f6-82ba310879a0 + + ownerid + String + false + false + false + + false + canmodifyadditionalsettings + false + + 25 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + owneridname + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + OwnerIdName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + + + Text + + + false + 0 + 320 + + + 1a7a02c6-64df-4cbd-88b3-9059ca3c65d1 + + ownerid + EntityName + false + false + false + + false + canmodifyadditionalsettings + false + + 27 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + false + + owneridtype + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + OwnerIdType + + + EntityNameType + + 5.0.0.0 + false + + + + + + true + + + 6e55575d-5e3d-4908-9270-cda6d57332d3 + + ownerid + String + false + false + false + + false + canmodifyadditionalsettings + false + + 36 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + owneridyominame + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + OwnerIdYomiName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 100 + owneridname + + Text + + + false + 0 + 320 + + + 4f946828-9978-4ea4-a37f-46db1aaa772b + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 3 + 1900-01-01T00:00:00 + + + + + f9e8af0c-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the business unit that owns the template. + 1033 + + + + f9e8af0c-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the business unit that owns the template. + 1033 + + + + + + f8e8af0c-2341-db11-898a-0007e9e17ebd + + true + Owning Business Unit + 1033 + + + + f8e8af0c-2341-db11-898a-0007e9e17ebd + + true + Owning Business Unit + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + true + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + true + true + true + false + true + + owningbusinessunit + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + OwningBusinessUnit + + + LookupType + + 5.0.0.0 + false + + + None + + businessunit + + + + 21ba76d9-58e4-4451-a17f-e808155eb9f4 + + owningbusinessunit + String + false + false + false + + true + canmodifyadditionalsettings + true + + 10000 + 2026-05-15T07:22:29.5469952 + + + + + + + + + + template + + + + true + canmodifyauditsettings + true + + false + + true + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + false + false + false + + true + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + true + canmodifysearchsettings + false + + false + false + false + true + false + false + + owningbusinessunitname + 2026-05-15T07:22:29.5469952 + + true + canmodifyrequirementlevelsettings + None + + OwningBusinessUnitName + + + StringType + + 5.0.0.0 + true + 0 + + Text + Auto + 160 + + + Text + + + false + 0 + 320 + + + 3c708216-9ffd-480b-a84b-78d6cd56a583 + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 50 + 1900-01-01T00:00:00 + + + + + 4f1d9b1e-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the team who owns the template. + 1033 + + + + 4f1d9b1e-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the team who owns the template. + 1033 + + + + + + 364cfbe8-ba39-43f1-9ea0-1fd0d8fe543a + + true + Owning Team + 1033 + + + + 364cfbe8-ba39-43f1-9ea0-1fd0d8fe543a + + true + Owning Team + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + owningteam + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + OwningTeam + + + LookupType + + 5.0.0.0 + true + + + None + + team + + + + c8a1139a-b6d6-4f50-a136-d9fc8b0e460a + + + Lookup + false + false + false + + false + canmodifyadditionalsettings + false + + 12 + 1900-01-01T00:00:00 + + + + + 421d9b1e-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the user who owns the template. + 1033 + + + + 421d9b1e-2341-db11-898a-0007e9e17ebd + + true + Unique identifier of the user who owns the template. + 1033 + + + + + + 808bb9e1-4dcb-4652-a9b5-f4682127f409 + + true + Owning User + 1033 + + + + 808bb9e1-4dcb-4652-a9b5-f4682127f409 + + true + Owning User + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + owninguser + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + OwningUser + + + LookupType + + 5.0.0.0 + true + + + None + + systemuser + + + + 281a44a6-e592-46e2-b88e-a51aa9fde9f6 + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 14 + 1900-01-01T00:00:00 + + + + + 08e8af0c-2341-db11-898a-0007e9e17ebd + + true + XML data for the body of the email template. + 1033 + + + + 08e8af0c-2341-db11-898a-0007e9e17ebd + + true + XML data for the body of the email template. + 1033 + + + + + + 07e8af0c-2341-db11-898a-0007e9e17ebd + + true + Presentation XML + 1033 + + + + 07e8af0c-2341-db11-898a-0007e9e17ebd + + true + Presentation XML + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + presentationxml + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + PresentationXml + + + MemoType + + 5.0.0.0 + false + + + TextArea + Auto + 1073741823 + + TextArea + + false + + + 6db9efc5-ca95-478e-af0a-c7f181917fe8 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 56 + 1900-01-01T00:00:00 + + + + + 2d6ad07a-1069-494b-b35b-8078bda15c1d + + true + For internal use only. Shows the number of times emails that use this template have received replies. + 1033 + + + + 2d6ad07a-1069-494b-b35b-8078bda15c1d + + true + For internal use only. Shows the number of times emails that use this template have received replies. + 1033 + + + + + + 67fa504d-a9b8-4019-8ca7-b7f09e0010c4 + + true + Reply Count + 1033 + + + + 67fa504d-a9b8-4019-8ca7-b7f09e0010c4 + + true + Reply Count + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + replycount + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + ReplyCount + + + IntegerType + + 8.2.0.0 + false + 0 + + None + 2147483647 + 0 + + 0 + + + 8ea17bab-e6b9-40a0-821b-3c163c8404c1 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 60 + 1900-01-01T00:00:00 + + + + + 1e62ae6e-4c6d-44e8-baf1-74cafbccac77 + + true + Shows the reply rate for this template. This is based on number of replies received on followed emails that use this template. + 1033 + + + + 1e62ae6e-4c6d-44e8-baf1-74cafbccac77 + + true + Shows the reply rate for this template. This is based on number of replies received on followed emails that use this template. + 1033 + + + + + + 381d62de-55a0-4da0-89b9-983ce4e03bec + + true + Reply Rate + 1033 + + + + 381d62de-55a0-4da0-89b9-983ce4e03bec + + true + Reply Rate + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + replyrate + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + ReplyRate + + + IntegerType + + 8.2.0.0 + false + 0 + + None + 2147483647 + 0 + + 0 + + + 96523be8-ae07-43d0-96bd-e5616956e0ae + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 10001 + 2026-05-15T11:47:34.3330048 + + + + + 3e257413-2dfa-40af-8948-c11223b561a1 + + true + Safe html of email template. + 1033 + + + + 3e257413-2dfa-40af-8948-c11223b561a1 + + true + Safe html of email template. + 1033 + + + + + + 43de2f2a-81ae-4d36-bc25-4c3141f35f05 + + true + Safe HTML of email template + 1033 + + + + 43de2f2a-81ae-4d36-bc25-4c3141f35f05 + + true + Safe HTML of email template + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + true + false + true + true + true + + safehtml + 2026-05-15T11:47:34.3330048 + + false + canmodifyrequirementlevelsettings + None + + SafeHtml + + + MemoType + + 9.0.0.0 + false + + + TextArea + Auto + 1073741823 + + TextArea + + false + + + dfe5b70f-2c12-46ff-9f54-4439b3c04494 + + + Uniqueidentifier + false + false + false + + false + canmodifyadditionalsettings + false + + 39 + 1900-01-01T00:00:00 + + + + + e493d368-c2bd-49b4-a770-821ec99623bf + + true + Unique identifier of the associated solution. + 1033 + + + + e493d368-c2bd-49b4-a770-821ec99623bf + + true + Unique identifier of the associated solution. + 1033 + + + + + + 86c4c5ca-344c-43d5-b0ae-2a886f0e4ba4 + + true + Solution + 1033 + + + + 86c4c5ca-344c-43d5-b0ae-2a886f0e4ba4 + + true + Solution + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + solutionid + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + SolutionId + + + UniqueidentifierType + + 5.0.0.0 + false + + + + + fd357f5c-54c2-4f64-92b2-c1729dd97fdf + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 2 + 1900-01-01T00:00:00 + + + + + d4cde1dc-2241-db11-898a-0007e9e17ebd + + true + Subject associated with the email template. + 1033 + + + + d4cde1dc-2241-db11-898a-0007e9e17ebd + + true + Subject associated with the email template. + 1033 + + + + + + d3cde1dc-2241-db11-898a-0007e9e17ebd + + true + Subject + 1033 + + + + d3cde1dc-2241-db11-898a-0007e9e17ebd + + true + Subject + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + subject + 2026-05-15T11:47:34.8329984 + + false + canmodifyrequirementlevelsettings + ApplicationRequired + + Subject + + + MemoType + + 5.0.0.0 + false + + + Text + Auto + 5000 + + Text + + false + + + db69d772-8a60-4718-89f6-32190d1919df + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 30 + 1900-01-01T00:00:00 + + + + + 8454c2fa-2241-db11-898a-0007e9e17ebd + + true + XML data for the subject of the email template. + 1033 + + + + 8454c2fa-2241-db11-898a-0007e9e17ebd + + true + XML data for the subject of the email template. + 1033 + + + + + + 8354c2fa-2241-db11-898a-0007e9e17ebd + + true + Subject XML + 1033 + + + + 8354c2fa-2241-db11-898a-0007e9e17ebd + + true + Subject XML + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + false + false + true + true + true + + subjectpresentationxml + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + SubjectPresentationXml + + + MemoType + + 5.0.0.0 + false + + + TextArea + Auto + 1073741823 + + TextArea + + false + + + fbb526b1-60dc-4a81-93f0-0f528072c81d + + + Memo + false + false + false + + false + canmodifyadditionalsettings + false + + 10002 + 2026-05-15T11:47:34.3670016 + + + + + 446c2253-8898-41c9-a66b-db8c7400a341 + + true + Safe html of email template subject. + 1033 + + + + 446c2253-8898-41c9-a66b-db8c7400a341 + + true + Safe html of email template subject. + 1033 + + + + + + 2b4656e2-e1fa-4a54-be9c-5b1f69ed8e0f + + true + Safe HTML of email template subject + 1033 + + + + 2b4656e2-e1fa-4a54-be9c-5b1f69ed8e0f + + true + Safe HTML of email template subject + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + true + true + false + true + true + true + + subjectsafehtml + 2026-05-15T11:47:34.3670016 + + false + canmodifyrequirementlevelsettings + None + + SubjectSafeHtml + + + MemoType + + 9.0.0.0 + false + + + TextArea + Auto + 1073741823 + + TextArea + + false + + + aa6fc6fa-e20a-4ba5-99aa-4eefcd922598 + + + Uniqueidentifier + false + false + false + + false + canmodifyadditionalsettings + false + + 40 + 1900-01-01T00:00:00 + + + + + 67307349-acbd-4112-968f-b10e4aa08774 + + true + For internal use only. + 1033 + + + + 67307349-acbd-4112-968f-b10e4aa08774 + + true + For internal use only. + 1033 + + + + + + b4549769-e02d-489e-8ed9-6423165d0125 + + true + Solution + 1033 + + + + b4549769-e02d-489e-8ed9-6423165d0125 + + true + Solution + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + false + false + false + + supportingsolutionid + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + SupportingSolutionId + + + UniqueidentifierType + + 5.0.0.0 + false + + + + + cf2042c2-fd1f-4932-9569-b18411a11cac + + + Uniqueidentifier + false + false + false + + false + canmodifyadditionalsettings + false + + 1 + 1900-01-01T00:00:00 + + + + + 0853c2fa-2241-db11-898a-0007e9e17ebd + + true + Unique identifier of the template. + 1033 + + + + 0853c2fa-2241-db11-898a-0007e9e17ebd + + true + Unique identifier of the template. + 1033 + + + + + + 0753c2fa-2241-db11-898a-0007e9e17ebd + + true + Email Template + 1033 + + + + 0753c2fa-2241-db11-898a-0007e9e17ebd + + true + Email Template + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + true + + true + canmodifyglobalfiltersettings + false + + true + true + false + + false + isrenameable + false + + false + true + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + false + true + false + true + + templateid + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + TemplateId + + + UniqueidentifierType + + 5.0.0.0 + false + + + + + 16355f79-7183-4f85-a905-d60e25b6cd5d + + + Uniqueidentifier + false + false + false + + false + canmodifyadditionalsettings + false + + 41 + 1900-01-01T00:00:00 + + + + + af5cf60d-207a-4bcd-855b-488a84a47615 + + true + For internal use only. + 1033 + + + + af5cf60d-207a-4bcd-855b-488a84a47615 + + true + For internal use only. + 1033 + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + templateidunique + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + SystemRequired + + TemplateIdUnique + + + UniqueidentifierType + + 5.0.0.0 + false + + + + + cd1d90b9-e1b8-49c8-b8f4-106ccdd88051 + + + EntityName + false + false + false + + false + canmodifyadditionalsettings + false + + 8 + 1900-01-01T00:00:00 + + + + + 0754c2fa-2241-db11-898a-0007e9e17ebd + + true + Type of email template. + 1033 + + + + 0754c2fa-2241-db11-898a-0007e9e17ebd + + true + Type of email template. + 1033 + + + + + + 0654c2fa-2241-db11-898a-0007e9e17ebd + + true + Template Type + 1033 + + + + 0654c2fa-2241-db11-898a-0007e9e17ebd + + true + Template Type + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + true + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + true + true + true + true + + templatetypecode + 2026-05-15T11:47:34.4130048 + + false + canmodifyrequirementlevelsettings + SystemRequired + + TemplateTypeCode + + + EntityNameType + + 5.0.0.0 + false + + + -1 + + 2be068b7-04d3-45bf-b24b-f268fd56156d + + + + + 40d4c6e3-d814-46dd-b0de-89540069b604 + + true + Type of email template. + 1033 + + + + 40d4c6e3-d814-46dd-b0de-89540069b604 + + true + Type of email template. + 1033 + + + + + + 4439956c-fe1e-449e-8991-c14e012b4ca4 + + true + Template Type + 1033 + + + + 4439956c-fe1e-449e-8991-c14e012b4ca4 + + true + Template Type + 1033 + + + + false + + false + iscustomizable + true + + false + true + template_templatetypecode + Picklist + 5.0.0.0 + + + + + + + + + + + false + true + + + + 0f54c2fa-2241-db11-898a-0007e9e17ebd + + true + Account + 1033 + + + + 0f54c2fa-2241-db11-898a-0007e9e17ebd + + true + Account + 1033 + + + account + 1 + + + + + + + + + + + + false + true + + + + 1154c2fa-2241-db11-898a-0007e9e17ebd + + true + Contact + 1033 + + + + 1154c2fa-2241-db11-898a-0007e9e17ebd + + true + Contact + 1033 + + + contact + 2 + + + + + + + + + + + + false + true + + + + 2154c2fa-2241-db11-898a-0007e9e17ebd + + true + System Job + 1033 + + + + 2154c2fa-2241-db11-898a-0007e9e17ebd + + true + System Job + 1033 + + + asyncoperation + 4700 + + + + + + + + + + + + false + true + + + + 0954c2fa-2241-db11-898a-0007e9e17ebd + + true + User + 1033 + + + + 0954c2fa-2241-db11-898a-0007e9e17ebd + + true + User + 1033 + + + systemuser + 8 + + + + + + + true + + + 8daa3583-0741-40a1-ad16-15bcbe82db77 + + templatetypecode + Virtual + false + false + false + + false + canmodifyadditionalsettings + false + + 29 + 1900-01-01T00:00:00 + + + + + + + + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + false + + templatetypecodename + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + TemplateTypeCodeName + + + VirtualType + + 5.0.0.0 + true + + + + + bac1c51a-8e29-45a3-8cea-e81c2368872f + + + String + false + false + false + + false + canmodifyadditionalsettings + false + + 10 + 1900-01-01T00:00:00 + + + + + e8d7a218-2341-db11-898a-0007e9e17ebd + + true + Title of the template. + 1033 + + + + e8d7a218-2341-db11-898a-0007e9e17ebd + + true + Title of the template. + 1033 + + + + + + e7d7a218-2341-db11-898a-0007e9e17ebd + + true + Title + 1033 + + + + e7d7a218-2341-db11-898a-0007e9e17ebd + + true + Title + 1033 + + + template + + + + true + canmodifyauditsettings + true + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + true + + false + isrenameable + false + + false + true + true + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + true + false + true + true + true + true + + title + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + ApplicationRequired + + Title + + + StringType + + 5.0.0.0 + false + 0 + + Text + Auto + 200 + + + Text + + + false + 0 + 400 + + + 0787149a-40b4-45e9-ac33-cc59923cf027 + + + Integer + false + false + false + + false + canmodifyadditionalsettings + false + + 61 + 1900-01-01T00:00:00 + + + + + 24d31f47-0d64-43dd-aa24-663d381ba775 + + true + Shows the number of sent emails that use this template. + 1033 + + + + 24d31f47-0d64-43dd-aa24-663d381ba775 + + true + Shows the number of sent emails that use this template. + 1033 + + + + + + b5b5aa19-6c36-4cd1-acad-383cc1923c9e + + true + Sent email count + 1033 + + + + b5b5aa19-6c36-4cd1-acad-383cc1923c9e + + true + Sent email count + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + true + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + true + + false + false + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + true + + false + false + true + true + false + true + + usedcount + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + UsedCount + + + IntegerType + + 8.2.0.0 + false + 0 + + None + 2147483647 + 0 + + 0 + + + 0b00c500-0d91-4edf-a9a4-3817d43d86c5 + + + BigInt + false + false + false + + false + canmodifyadditionalsettings + false + + 18 + 1900-01-01T00:00:00 + + + + + 7996c2d8-ca66-441b-9583-42de92544e40 + + true + Version number of the template. + 1033 + + + + 7996c2d8-ca66-441b-9583-42de92544e40 + + true + Version number of the template. + 1033 + + + + + + eef1b083-63ef-4ae9-8850-ae64b729baee + + true + Version Number + 1033 + + + + eef1b083-63ef-4ae9-8850-ae64b729baee + + true + Version Number + 1033 + + + template + + + + false + canmodifyauditsettings + false + + false + + false + iscustomizable + false + + false + false + + true + canmodifyglobalfiltersettings + false + + true + false + false + + false + isrenameable + false + + false + true + false + false + + true + canmodifyissortablesettings + false + + + false + canmodifysearchsettings + false + + false + false + false + true + false + true + + versionnumber + 1900-01-01T00:00:00 + + false + canmodifyrequirementlevelsettings + None + + VersionNumber + + + BigIntType + + 5.0.0.0 + false + + + 9223372036854775807 + -9223372036854775808 + + + false + false + false + + false + canbeincustomentityassociation + false + + + false + canbeinmanytomany + false + + + false + canbeprimaryentityinrelationship + false + + + false + canberelatedentityinrelationship + false + + true + + true + canchangetrackingbeenabled + true + + + false + cancreateattributes + false + + + false + cancreatecharts + false + + + false + cancreateforms + false + + + false + cancreateviews + true + + + false + canenablesynctoexternalsearchindex + false + + + true + canmodifyadditionalsettings + true + + true + false + Local + 1900-01-01T00:00:00 + + + false + + + + 0ddd01b9-2241-db11-898a-0007e9e17ebd + + true + Template for an email message that contains the standard attributes of an email message. + 1033 + + + + 0ddd01b9-2241-db11-898a-0007e9e17ebd + + true + Template for an email message that contains the standard attributes of an email message. + 1033 + + + + + + 0fdd01b9-2241-db11-898a-0007e9e17ebd + + true + Email Templates + 1033 + + + + 0fdd01b9-2241-db11-898a-0007e9e17ebd + + true + Email Templates + 1033 + + + + + + 0edd01b9-2241-db11-898a-0007e9e17ebd + + true + Email Template + 1033 + + + + 0edd01b9-2241-db11-898a-0007e9e17ebd + + true + Email Template + 1033 + + + false + + false + false + false + false + + + + + false + false + false + false + + true + canmodifyauditsettings + false + + true + false + false + + false + canmodifyconnectionsettings + false + + false + + false + iscustomizable + true + + false + false + + false + canmodifyduplicatedetectionsettings + false + + false + false + false + false + false + false + false + + false + canmodifymailmergesettings + false + + true + + false + ismappable + false + + false + false + + false + canmodifymobileclientreadonly + false + + true + + false + isrenameable + true + + false + false + false + true + false + true + + false + canmodifyqueuesettings + false + + + false + canmodifymobilevisibility + false + + + false + canmodifymobileclientvisibility + true + + template + + + + 975c286e-54a5-430d-b05d-e2ed66804dff + + false + + false + iscustomizable + false + + true + true + system_user_email_templates + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + systemuserid + systemuser + system_user_email_templates + owninguser + template + owninguser + + 0 + + + 72f8fb8b-5f25-4854-86eb-5100b27c4e26 + + false + + false + iscustomizable + false + + true + true + lk_templatebase_modifiedby + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + systemuserid + systemuser + lk_templatebase_modifiedby + modifiedby + template + modifiedby + + 0 + + + b6928293-c433-4da5-8f25-208338bcaac4 + + false + + false + iscustomizable + false + + true + true + lk_templatebase_createdby + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + systemuserid + systemuser + lk_templatebase_createdby + createdby + template + createdby + + 0 + + + 5a19faa3-db82-4f65-8511-c0cf68e351ba + + false + + false + iscustomizable + false + + true + false + owner_templates + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + Restrict + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + ownerid + owner + owner_templates + ownerid + template + ownerid + + 0 + + + c25f5eaf-8f92-4ec9-8ed1-65f310fffdc2 + + false + + false + iscustomizable + false + + true + true + lk_templatebase_createdonbehalfby + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + systemuserid + systemuser + lk_templatebase_createdonbehalfby + createdonbehalfby + template + createdonbehalfby + + 0 + + + 347d35b2-b0ff-45d0-a4f8-6e0687ee5b40 + + false + + false + iscustomizable + false + + true + true + team_email_templates + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + teamid + team + team_email_templates + owningteam + template + owningteam + + 0 + + + 66715cda-65c4-4c44-95f4-e68ecb284369 + + false + + false + iscustomizable + false + + true + true + lk_templatebase_modifiedonbehalfby + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + systemuserid + systemuser + lk_templatebase_modifiedonbehalfby + modifiedonbehalfby + template + modifiedonbehalfby + + 0 + + + 0eb5a9db-5350-f111-bec6-e4fb1ef8f465 + + false + + false + iscustomizable + false + + true + false + ImageDescriptor_Template + None + 6.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + imagedescriptorid + imagedescriptor + ImageDescriptor_Template + entityimageid + template + entityimageid_imagedescriptor + + 0 + + + bccaeff8-a650-4a59-9b5a-3ec33438b3ce + + false + + false + iscustomizable + false + + true + false + business_unit_templates + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + businessunitid + businessunit + business_unit_templates + owningbusinessunit + template + owningbusinessunit + + 0 + + + 2026-05-15T16:03:49.2099968 + 2010 + + + 44042f12-485e-4e9a-aaff-588f692f186e + + false + + false + iscustomizable + false + + true + true + Template_AsyncOperations + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + Template_AsyncOperations + regardingobjectid + asyncoperation + regardingobjectid_template + + 0 + + + 10958037-4bc9-4153-85a7-8d3bdb661f6f + + false + + false + iscustomizable + false + + true + true + Template_ProcessSessions + None + 5.0.0.0 + OneToManyRelationship + + UseCollectionName + Details + + + + + 110 + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + Template_ProcessSessions + regardingobjectid + processsession + regardingobjectid_template + + 0 + + + a9835154-a72e-47f2-b9f9-d929fb0a00a0 + + false + + false + iscustomizable + true + + true + true + Template_SyncErrors + Append + 8.1.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + Cascade + Cascade + Cascade + Cascade + Cascade + Cascade + NoCascade + + + + + false + false + templateid + template + Template_SyncErrors + regardingobjectid + syncerror + regardingobjectid_template_syncerror + + 1 + + + dcda8e64-c0fe-4d2d-8a8a-e32d365fa90d + + false + + false + iscustomizable + false + + true + false + Template_Organization + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + RemoveLink + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + Template_Organization + acknowledgementtemplateid + organization + acknowledgementtemplateid + + 0 + + + 9beff8aa-f008-4a46-8846-59649bbe5460 + + false + + false + iscustomizable + false + + true + false + Template_BulkDeleteFailures + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + Cascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + Template_BulkDeleteFailures + regardingobjectid + bulkdeletefailure + regardingobjectid_template + + 0 + + + 760df4d9-e26a-4d72-a1f5-e8da979e61c6 + + false + + false + iscustomizable + true + + true + true + Email_EmailTemplate + ParentChild + 8.2.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + RemoveLink + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + Email_EmailTemplate + templateid + email + templateid + + 2 + + + 8ff49bdd-71a3-470b-a986-043cea152cea + + false + + false + iscustomizable + false + + true + true + emailtemplate_convertrule + Append + 6.1.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + Restrict + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + emailtemplate_convertrule + responsetemplateid + convertrule + responsetemplateid + + 1 + + + 4c37f9e8-f9b4-4c94-a4a1-8690ae249c69 + + false + + false + iscustomizable + false + + true + true + template_activity_mime_attachments + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + Cascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + template_activity_mime_attachments + objectid + activitymimeattachment + objectid_template + + 0 + + + 94b415f9-da73-4fee-b50a-c1035c08799f + + false + + false + iscustomizable + false + + true + false + userentityinstancedata_template + None + 5.0.0.0 + OneToManyRelationship + + DoNotDisplay + Details + + + + + + true + + false + + + 00000000-0000-0000-0000-000000000000 + + + NoCascade + NoCascade + Cascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + + + + + false + false + templateid + template + userentityinstancedata_template + objectid + userentityinstancedata + objectid_template + + 0 + + + + 8 + UserOwned + + templateid + + title + + + true + true + false + true + true + false + false + prvCreateEmailTemplate + 921dac3c-3dc0-4f66-83c1-f4e6ea427a45 + Create + + + true + true + false + true + true + false + false + prvReadEmailTemplate + 6c619dca-e165-4baa-ba16-ef6f820a0e01 + Read + + + true + true + false + true + true + false + false + prvWriteEmailTemplate + f2cc25b1-bfcc-4f7c-a6c3-9a5fc386391a + Write + + + true + true + false + true + true + false + false + prvDeleteEmailTemplate + ffe4299b-7978-4b50-a724-2317db0d3949 + Delete + + + true + true + false + true + true + false + false + prvAssignEmailTemplate + 17b31e5e-bc94-4967-b83f-c7049eb483da + Assign + + + true + true + false + true + true + false + false + prvShareEmailTemplate + df6a99af-703c-47cb-80c6-74eb519ad453 + Share + + + true + true + false + true + true + false + false + prvAppendEmailTemplate + 57444774-b24c-4684-a514-dfcab252c331 + Append + + + true + true + false + true + true + false + false + prvAppendToEmailTemplate + c7057b81-25b8-4940-9ced-eed842b712a5 + AppendTo + + + false + false + false + true + false + false + false + prvCreateOrgEmailTemplates + 01750f14-3320-49cc-a7d1-52502cdcd16d + None + + + + FilteredTemplate + Template + + + false + Standard + false + 5.0.0.0 + entityimage + + false + canchangehierarchicalrelationship + false + + + false + Templates + + + true + + templates + 0 + templates + false + + true + canmodifymobileclientoffline + false + + false + false + + false + false + + + + + + + \ No newline at end of file diff --git a/tests/XrmMockup365Test/TestEmailTemplateRenderer.cs b/tests/XrmMockup365Test/TestEmailTemplateRenderer.cs new file mode 100644 index 00000000..a7215897 --- /dev/null +++ b/tests/XrmMockup365Test/TestEmailTemplateRenderer.cs @@ -0,0 +1,108 @@ +using DG.Tools.XrmMockup; +using Microsoft.Xrm.Sdk; +using System.Collections.Generic; +using Xunit; + +namespace DG.XrmMockupTest +{ + /// + /// Unit tests for the XSLT-based template rendering used by SendEmailFromTemplate. The + /// stylesheets below are the actual subject/body of the built-in "Thank you for registering + /// with us" contact template in Dataverse. + /// + public class TestEmailTemplateRenderer + { + private const string RealSubjectXslt = + "" + + "" + + ""; + + private const string RealBodyXslt = + "" + + "" + + "Dear ]]>" + + "Valued Customer" + + "Name: ]]>" + + "Street Address: ]]>No Address Provided" + + "E-mail Address: ]]>" + + "]]>"; + + [Fact] + public void RendersStaticSubject() + { + var entities = new Dictionary + { + ["contact"] = new Entity("contact") + }; + + var result = EmailTemplateRenderer.Render(RealSubjectXslt, entities); + + Assert.Equal("Thank you for registering with us", result); + } + + [Fact] + public void RendersBodyWithRegardingAndSenderValues() + { + var contact = new Entity("contact") + { + ["salutation"] = "Mr", + ["lastname"] = "Smith", + ["address1_line1"] = "123 Main St", + ["emailaddress1"] = "smith@test.com" + }; + var user = new Entity("systemuser") + { + ["fullname"] = "Admin User" + }; + + var entities = new Dictionary + { + ["contact"] = contact, + ["systemuser"] = user + }; + + var result = EmailTemplateRenderer.Render(RealBodyXslt, entities); + + // Values are merged from the regarding contact and the sending systemuser. + // The "MrSmith" concatenation (no space) is verified against real Dataverse output: + // SendEmailFromTemplate against a live org renders this same template as "Dear MrSmith ," + // because XSLT strips the whitespace-only stylesheet text node between the two values. + Assert.Contains("Dear MrSmith", result); + Assert.Contains("Name: Admin User", result); + Assert.Contains("Street Address: 123 Main St", result); + Assert.Contains("E-mail Address: smith@test.com", result); + } + + [Fact] + public void UsesXsltDefaultsWhenAttributesMissing() + { + // contact has neither lastname nor address1_line1 -> the defaults apply. + var entities = new Dictionary + { + ["contact"] = new Entity("contact") { ["salutation"] = "Ms" } + }; + + var result = EmailTemplateRenderer.Render(RealBodyXslt, entities); + + Assert.Contains("Dear Ms", result); + Assert.Contains("Valued Customer", result); + Assert.Contains("Street Address: No Address Provided", result); + } + + [Fact] + public void ReturnsPlainTextTemplatesUnchanged() + { + var entities = new Dictionary(); + + var result = EmailTemplateRenderer.Render("Just plain text", entities); + + Assert.Equal("Just plain text", result); + } + + [Fact] + public void ReturnsNullForNullInput() + { + Assert.Null(EmailTemplateRenderer.Render(null, new Dictionary())); + } + } +} diff --git a/tests/XrmMockup365Test/TestSendEmailFromTemplate.cs b/tests/XrmMockup365Test/TestSendEmailFromTemplate.cs new file mode 100644 index 00000000..12ca20bf --- /dev/null +++ b/tests/XrmMockup365Test/TestSendEmailFromTemplate.cs @@ -0,0 +1,288 @@ +using DG.XrmFramework.BusinessDomain.ServiceContext; +using Microsoft.Crm.Sdk.Messages; +using Microsoft.Xrm.Sdk; +using Microsoft.Xrm.Sdk.Messages; +using Microsoft.Xrm.Sdk.Metadata; +using Microsoft.Xrm.Sdk.Query; +using System; +using System.Linq; +using System.ServiceModel; +using Xunit; + +namespace DG.XrmMockupTest +{ + public class TestSendEmailFromTemplate : UnitTestBase + { + public TestSendEmailFromTemplate(XrmMockupFixture fixture) : base(fixture) { } + + private Email BuildEmail(Contact recipient) + { + return new Email + { + From = new ActivityParty[] + { + new ActivityParty { PartyId = crm.AdminUser } + }, + To = new ActivityParty[] + { + new ActivityParty { PartyId = recipient.ToEntityReference() } + }, + Subject = "Test Email From Template", + }; + } + + private int ObjectTypeCode(string logicalName) + { + var response = (RetrieveEntityResponse)orgAdminService.Execute(new RetrieveEntityRequest + { + LogicalName = logicalName, + EntityFilters = EntityFilters.Entity + }); + return response.EntityMetadata.ObjectTypeCode.Value; + } + + private Template CreateContactTemplate() => CreateContactTemplate(SubjectXslt, BodyXslt); + + private Template CreateContactTemplate(string subject, string body) + { + var template = new Template + { + Title = "Registration", + Subject = subject, + Body = body, + IsPersonal = false, + LanguageCode = 1033 + }; + // templatetypecode is an OptionSet-backed EntityName attribute, so XrmMockup stores it + // as the entity's integer object type code rather than the logical-name string. + template["templatetypecode"] = ObjectTypeCode(Contact.EntityLogicalName); + template.Id = orgAdminService.Create(template); + return template; + } + + [Fact] + public void TestSendEmailFromTemplateCreatesAndSendsEmail() + { + var contact = new Contact + { + FirstName = "Test", + EMailAddress1 = "test@test.com" + }; + contact.Id = orgAdminUIService.Create(contact); + + var template = CreateContactTemplate(); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = template.Id, + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + var response = orgAdminUIService.Execute(request) as SendEmailFromTemplateResponse; + + Assert.NotNull(response); + Assert.NotEqual(Guid.Empty, response.Id); + + using (var context = new Xrm(orgAdminUIService)) + { + var email = context.EmailSet.FirstOrDefault(e => e.Id == response.Id); + Assert.NotNull(email); + Assert.Equal(EmailState.Completed, email.StateCode); + Assert.Equal(Email_StatusCode.PendingSend, email.StatusCode); + Assert.Equal(contact.Id, email.RegardingObjectId.Id); + } + } + + // The subject/body below are XSLT stylesheets in the same shape Dataverse stores them in. + private const string SubjectXslt = + "" + + "" + + ""; + + private const string BodyXslt = + "" + + "" + + "Dear ]]>Valued Customer" + + "" + + "]]>"; + + [Fact] + public void TestSendEmailFromTemplateRendersTemplateContent() + { + var template = CreateContactTemplate(); + + var contact = new Contact + { + FirstName = "Test", + LastName = "Smith", + EMailAddress1 = "smith@test.com" + }; + contact.Id = orgAdminUIService.Create(contact); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = template.Id, + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + var response = orgAdminUIService.Execute(request) as SendEmailFromTemplateResponse; + Assert.NotNull(response); + Assert.NotEqual(Guid.Empty, response.Id); + + var email = orgAdminService + .Retrieve(Email.EntityLogicalName, response.Id, new ColumnSet("subject", "description", "statecode")) + .ToEntity(); + + // Subject and body were rendered from the template, overriding the caller's subject. + Assert.Equal("Thank you for registering with us", email.Subject); + Assert.Contains("Dear", email.Description); + Assert.Contains("Smith", email.Description); + Assert.Contains("smith@test.com", email.Description); + Assert.Equal(EmailState.Completed, email.StateCode); + } + + // A body stylesheet that merges a field from the sending systemuser rather than the + // regarding record. The handler adds the executing user to the render context. + private const string SenderBodyXslt = + "" + + "" + + ""; + + [Fact] + public void TestSendEmailFromTemplateMergesSenderFields() + { + // Give the user that orgAdminUIService runs as a known, mergeable value, then verify + // it flows through the sender side of the render context (not the regarding record). + orgAdminService.Update(new Entity("systemuser", crm.AdminUser.Id) { ["firstname"] = "Sender" }); + + var contact = new Contact { FirstName = "Test", EMailAddress1 = "sender@test.com" }; + contact.Id = orgAdminUIService.Create(contact); + + var template = CreateContactTemplate(SubjectXslt, SenderBodyXslt); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = template.Id, + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + var response = orgAdminUIService.Execute(request) as SendEmailFromTemplateResponse; + Assert.NotNull(response); + + var email = orgAdminService + .Retrieve(Email.EntityLogicalName, response.Id, new ColumnSet("description")) + .ToEntity(); + + Assert.Equal("From: Sender", email.Description); + } + + [Fact] + public void TestSendEmailFromTemplateRendersPlainTextTemplate() + { + var contact = new Contact { FirstName = "Test", EMailAddress1 = "plain@test.com" }; + contact.Id = orgAdminUIService.Create(contact); + + // Not every template is an XSLT stylesheet; literal text must pass through unchanged. + var template = CreateContactTemplate("Plain subject", "Plain body text"); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = template.Id, + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + var response = orgAdminUIService.Execute(request) as SendEmailFromTemplateResponse; + Assert.NotNull(response); + + var email = orgAdminService + .Retrieve(Email.EntityLogicalName, response.Id, new ColumnSet("subject", "description")) + .ToEntity(); + + Assert.Equal("Plain subject", email.Subject); + Assert.Equal("Plain body text", email.Description); + } + + [Fact] + public void TestSendEmailFromTemplateThrowsWhenTemplateIdMissing() + { + var contact = new Contact { FirstName = "Test", EMailAddress1 = "test@test.com" }; + contact.Id = orgAdminUIService.Create(contact); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + Assert.Throws(() => orgAdminUIService.Execute(request)); + } + + [Fact] + public void TestSendEmailFromTemplateThrowsWhenRegardingMissing() + { + var contact = new Contact { FirstName = "Test", EMailAddress1 = "test@test.com" }; + contact.Id = orgAdminUIService.Create(contact); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = Guid.NewGuid() + }; + + Assert.Throws(() => orgAdminUIService.Execute(request)); + } + + [Fact] + public void TestSendEmailFromTemplateThrowsWhenTemplateDoesNotExist() + { + var contact = new Contact { FirstName = "Test", EMailAddress1 = "test@test.com" }; + contact.Id = orgAdminUIService.Create(contact); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = Guid.NewGuid(), + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + Assert.Throws(() => orgAdminUIService.Execute(request)); + } + + [Fact] + public void TestSendEmailFromTemplateThrowsWhenTemplateTypeMismatch() + { + var contact = new Contact { FirstName = "Test", EMailAddress1 = "test@test.com" }; + contact.Id = orgAdminUIService.Create(contact); + + // Template is bound to 'account' but the regarding record is a contact. + var template = new Template + { + Title = "Mismatch", + Subject = SubjectXslt, + Body = BodyXslt + }; + template["templatetypecode"] = ObjectTypeCode(Account.EntityLogicalName); + template.Id = orgAdminService.Create(template); + + var request = new SendEmailFromTemplateRequest + { + Target = BuildEmail(contact), + TemplateId = template.Id, + RegardingId = contact.Id, + RegardingType = Contact.EntityLogicalName + }; + + Assert.Throws(() => orgAdminUIService.Execute(request)); + } + } +}
Name: ]]>" + + "Street Address: ]]>No Address Provided" + + "E-mail Address: ]]>" + + "]]>