Template Entity Reference

Template for an email message that contains the standard attributes of an email message.

Messages

Message Web API Operation SDK Assembly
Assign PATCH [org URI]/api/data/v9.0/templates(templateid)
Update ownerid property.
AssignRequest
Create POST [org URI]/api/data/v9.0/templates
See Create
CreateRequest or
Create
Delete DELETE [org URI]/api/data/v9.0/templates(templateid)
See Delete
DeleteRequest or
Delete
GrantAccess GrantAccess Action GrantAccessRequest
InstantiateTemplate InstantiateTemplate Action InstantiateTemplateRequest
ModifyAccess ModifyAccess Action ModifyAccessRequest
Retrieve GET [org URI]/api/data/v9.0/templates(templateid)
See Retrieve
RetrieveRequest or
Retrieve
RetrieveMultiple GET [org URI]/api/data/v9.0/templates
See Query Data
RetrieveMultipleRequest or
RetrieveMultiple
RetrievePrincipalAccess RetrievePrincipalAccess Function RetrievePrincipalAccessRequest
RetrieveSharedPrincipalsAndAccess RetrieveSharedPrincipalsAndAccess Function RetrieveSharedPrincipalsAndAccessRequest
RevokeAccess RevokeAccess Action RevokeAccessRequest
SendEmail SendEmail Action SendEmailRequest
SendFax SendFax Action SendFaxRequest
SendTemplate SendTemplate Action SendTemplateRequest
Update PATCH [org URI]/api/data/v9.0/templates(templateid)
See Update
UpdateRequest or
Update

Entity Properties

Property Value
CollectionSchemaName Templates
DisplayCollectionName Email Templates
DisplayName Email Template
EntitySetName templates
IsBPFEntity False
LogicalCollectionName templates
LogicalName template
OwnershipType UserOwned
PrimaryIdAttribute templateid
PrimaryNameAttribute title
SchemaName Template

Writable attributes

These attributes return true for either IsValidForCreate or IsValidForUpdate (usually both). Listed by SchemaName.

Body

Property Value
Description Body text of the email template.
DisplayName Body
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName body
MaxLength 1073741823
RequiredLevel None
Type Memo

Description

Property Value
Description Description of the email template.
DisplayName Description
Format Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName description
MaxLength 2000
RequiredLevel None
Type Memo

GenerationTypeCode

Property Value
Description For internal use only.
DisplayName Generation Type Code
Format None
IsValidForForm False
IsValidForRead True
IsValidForUpdate False
LogicalName generationtypecode
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

ImportSequenceNumber

Property Value
Description Unique identifier of the data import or data migration that created this record.
DisplayName Import Sequence Number
Format None
IsValidForForm False
IsValidForRead True
IsValidForUpdate False
LogicalName importsequencenumber
MaxValue 2147483647
MinValue -2147483648
RequiredLevel None
Type Integer

IntroducedVersion

Property Value
Description Version in which the form is introduced.
DisplayName Introduced Version
FormatName VersionNumber
IsLocalizable False
IsValidForForm False
IsValidForRead True
IsValidForUpdate False
LogicalName introducedversion
MaxLength 48
RequiredLevel None
Type String

IsCustomizable

Property Value
Description Information that specifies whether this component can be customized.
DisplayName Customizable
IsValidForForm False
IsValidForRead True
LogicalName iscustomizable
RequiredLevel SystemRequired
Type ManagedProperty

IsPersonal

Property Value
Description Information about whether the template is personal or is available to all users.
DisplayName Viewable By
IsValidForForm False
IsValidForRead True
LogicalName ispersonal
RequiredLevel None
Type Boolean

IsPersonal Options

Value Label
1 Individual
0 Organization

DefaultValue: True

LanguageCode

Property Value
Description Language of the email template.
DisplayName Language
Format Language
IsValidForForm True
IsValidForRead True
LogicalName languagecode
MaxValue 2147483647
MinValue 0
RequiredLevel ApplicationRequired
Type Integer

MimeType

Property Value
Description MIME type of the email template.
DisplayName Mime Type
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName mimetype
MaxLength 256
RequiredLevel None
Type String

OwnerId

Property Value
Description Unique identifier of the user or team who owns the template for the email activity.
DisplayName Owner
IsValidForForm False
IsValidForRead True
LogicalName ownerid
RequiredLevel SystemRequired
Targets systemuser,team
Type Owner

OwnerIdType

Property Value
Description
DisplayName
IsValidForForm False
IsValidForRead True
LogicalName owneridtype
RequiredLevel SystemRequired
Type EntityName

PresentationXml

Property Value
Description XML data for the body of the email template.
DisplayName Presentation XML
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName presentationxml
MaxLength 1073741823
RequiredLevel None
Type Memo

Subject

Property Value
Description Subject associated with the email template.
DisplayName Subject
Format Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName subject
MaxLength 1000
RequiredLevel ApplicationRequired
Type Memo

SubjectPresentationXml

Property Value
Description XML data for the subject of the email template.
DisplayName Subject XML
Format TextArea
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName subjectpresentationxml
MaxLength 1073741823
RequiredLevel None
Type Memo

TemplateId

Property Value
Description Unique identifier of the template.
DisplayName Email Template
IsValidForForm False
IsValidForRead True
IsValidForUpdate False
LogicalName templateid
RequiredLevel SystemRequired
Type Uniqueidentifier

TemplateTypeCode

Property Value
Description Type of email template.
DisplayName Template Type
IsValidForForm False
IsValidForRead True
LogicalName templatetypecode
RequiredLevel SystemRequired
Type EntityName

Title

Property Value
Description Title of the template.
DisplayName Title
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName title
MaxLength 200
RequiredLevel ApplicationRequired
Type String

Read-only attributes

These attributes return false for both IsValidForCreate or IsValidForUpdate. Listed by SchemaName.

ComponentState

Property Value
Description For internal use only.
DisplayName Component State
IsValidForForm False
IsValidForRead True
LogicalName componentstate
RequiredLevel SystemRequired
Type Picklist

ComponentState Options

Value Label
0 Published
1 Unpublished
2 Deleted
3 Deleted Unpublished

CreatedBy

Property Value
Description Unique identifier of the user who created the email template.
DisplayName Created By
IsValidForForm False
IsValidForRead True
LogicalName createdby
RequiredLevel None
Targets systemuser
Type Lookup

CreatedByName

Property Value
Description Name of the user who created the email template.
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdbyname
MaxLength 100
RequiredLevel None
Type String

CreatedByYomiName

Property Value
Description YomiName of the user who created the email template.
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdbyyominame
MaxLength 100
RequiredLevel None
Type String

CreatedOn

Property Value
DateTimeBehavior UserLocal
Description Date and time when the email template was created.
DisplayName Created On
Format DateAndTime
IsValidForForm False
IsValidForRead True
LogicalName createdon
RequiredLevel None
Type DateTime

CreatedOnBehalfBy

Property Value
Description Unique identifier of the delegate user who created the template.
DisplayName Created By (Delegate)
IsValidForForm False
IsValidForRead True
LogicalName createdonbehalfby
RequiredLevel None
Targets systemuser
Type Lookup

CreatedOnBehalfByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdonbehalfbyname
MaxLength 100
RequiredLevel None
Type String

CreatedOnBehalfByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName createdonbehalfbyyominame
MaxLength 100
RequiredLevel None
Type String

IsManaged

Property Value
Description Indicates whether the solution component is part of a managed solution.
DisplayName Is Managed
IsValidForForm False
IsValidForRead True
LogicalName ismanaged
RequiredLevel SystemRequired
Type Boolean

IsManaged Options

Value Label
1 Managed
0 Unmanaged

DefaultValue: False

IsRecommended

Property Value
Description Indicates if a template is recommended by Dynamics 365.
DisplayName Recommended
IsValidForForm True
IsValidForRead True
LogicalName isrecommended
RequiredLevel None
Type Boolean

IsRecommended Options

Value Label
1 Yes
0 No

DefaultValue: False

ModifiedBy

Property Value
Description Unique identifier of the user who last modified the template.
DisplayName Modified By
IsValidForForm False
IsValidForRead True
LogicalName modifiedby
RequiredLevel None
Targets systemuser
Type Lookup

ModifiedByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedbyname
MaxLength 100
RequiredLevel None
Type String

ModifiedByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedbyyominame
MaxLength 100
RequiredLevel None
Type String

ModifiedOn

Property Value
DateTimeBehavior UserLocal
Description Date and time when the email template was last modified.
DisplayName Modified On
Format DateAndTime
IsValidForForm False
IsValidForRead True
LogicalName modifiedon
RequiredLevel None
Type DateTime

ModifiedOnBehalfBy

Property Value
Description Unique identifier of the delegate user who last modified the template.
DisplayName Modified By (Delegate)
IsValidForForm False
IsValidForRead True
LogicalName modifiedonbehalfby
RequiredLevel None
Targets systemuser
Type Lookup

ModifiedOnBehalfByName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedonbehalfbyname
MaxLength 100
RequiredLevel None
Type String

ModifiedOnBehalfByYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName modifiedonbehalfbyyominame
MaxLength 100
RequiredLevel None
Type String

OpenCount

Property Value
Description For internal use only. Shows the number of times emails that use this template have been opened.
DisplayName Open Count
Format None
IsValidForForm False
IsValidForRead True
LogicalName opencount
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

OpenRate

Property Value
Description Shows the open rate of this template. This is based on number of opens on followed emails that use this template.
DisplayName Open Rate
Format None
IsValidForForm True
IsValidForRead True
LogicalName openrate
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

OverwriteTime

Property Value
DateTimeBehavior UserLocal
Description For internal use only.
DisplayName Record Overwrite Time
Format DateOnly
IsValidForForm False
IsValidForRead True
LogicalName overwritetime
RequiredLevel SystemRequired
Type DateTime

OwnerIdName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName owneridname
MaxLength 100
RequiredLevel SystemRequired
Type String

OwnerIdYomiName

Property Value
Description
DisplayName
FormatName Text
IsLocalizable False
IsValidForForm False
IsValidForRead True
LogicalName owneridyominame
MaxLength 100
RequiredLevel SystemRequired
Type String

OwningBusinessUnit

Property Value
Description Unique identifier of the business unit that owns the template.
DisplayName Owning Business Unit
IsValidForForm False
IsValidForRead True
LogicalName owningbusinessunit
RequiredLevel None
Targets businessunit
Type Lookup

OwningTeam

Property Value
Description Unique identifier of the team who owns the template.
DisplayName Owning Team
IsValidForForm False
IsValidForRead True
LogicalName owningteam
RequiredLevel None
Targets team
Type Lookup

OwningUser

Property Value
Description Unique identifier of the user who owns the template.
DisplayName Owning User
IsValidForForm False
IsValidForRead True
LogicalName owninguser
RequiredLevel None
Targets systemuser
Type Lookup

ReplyCount

Property Value
Description For internal use only. Shows the number of times emails that use this template have received replies.
DisplayName Reply Count
Format None
IsValidForForm False
IsValidForRead True
LogicalName replycount
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

ReplyRate

Property Value
Description Shows the reply rate for this template. This is based on number of replies received on followed emails that use this template.
DisplayName Reply Rate
Format None
IsValidForForm False
IsValidForRead True
LogicalName replyrate
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

SolutionId

Property Value
Description Unique identifier of the associated solution.
DisplayName Solution
IsValidForForm False
IsValidForRead True
LogicalName solutionid
RequiredLevel SystemRequired
Type Uniqueidentifier

SupportingSolutionId

Property Value
Description For internal use only.
DisplayName Solution
IsValidForForm False
IsValidForRead False
LogicalName supportingsolutionid
RequiredLevel None
Type Uniqueidentifier

TemplateIdUnique

Property Value
Description For internal use only.
DisplayName
IsValidForForm False
IsValidForRead True
LogicalName templateidunique
RequiredLevel SystemRequired
Type Uniqueidentifier

UsedCount

Property Value
Description Shows the number of sent emails that use this template.
DisplayName Sent email count
Format None
IsValidForForm False
IsValidForRead True
LogicalName usedcount
MaxValue 2147483647
MinValue 0
RequiredLevel None
Type Integer

VersionNumber

Property Value
Description Version number of the template.
DisplayName Version Number
IsValidForForm False
IsValidForRead True
LogicalName versionnumber
MaxValue 9223372036854775807
MinValue -9223372036854775808
RequiredLevel None
Type BigInt

One-To-Many Relationships

Listed by SchemaName.

template_activity_mime_attachments

Same as activitymimeattachment entity template_activity_mime_attachments Many-To-One relationship.

Property Value
ReferencingEntity activitymimeattachment
ReferencingAttribute objectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName template_activity_mime_attachments
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: Cascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Template_SyncErrors

Same as syncerror entity Template_SyncErrors Many-To-One relationship.

Property Value
ReferencingEntity syncerror
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable True
ReferencedEntityNavigationPropertyName Template_SyncErrors
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: Cascade
Delete: Cascade
Merge: Cascade
Reparent: Cascade
Share: Cascade
Unshare: Cascade

Template_AsyncOperations

Same as asyncoperation entity Template_AsyncOperations Many-To-One relationship.

Property Value
ReferencingEntity asyncoperation
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName Template_AsyncOperations
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: NoCascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Email_EmailTemplate

Same as email entity Email_EmailTemplate Many-To-One relationship.

Property Value
ReferencingEntity email
ReferencingAttribute templateid
IsHierarchical False
IsCustomizable True
ReferencedEntityNavigationPropertyName Email_EmailTemplate
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: RemoveLink
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Template_Organization

Same as organization entity Template_Organization Many-To-One relationship.

Property Value
ReferencingEntity organization
ReferencingAttribute acknowledgementtemplateid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName Template_Organization
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: RemoveLink
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Template_ProcessSessions

Same as processsession entity Template_ProcessSessions Many-To-One relationship.

Property Value
ReferencingEntity processsession
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName Template_ProcessSessions
AssociatedMenuConfiguration Behavior: UseCollectionName
Group: Details
Label:
Order: 110
CascadeConfiguration Assign: NoCascade
Delete: NoCascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Template_BulkDeleteFailures

Same as bulkdeletefailure entity Template_BulkDeleteFailures Many-To-One relationship.

Property Value
ReferencingEntity bulkdeletefailure
ReferencingAttribute regardingobjectid
IsHierarchical False
IsCustomizable False
ReferencedEntityNavigationPropertyName Template_BulkDeleteFailures
AssociatedMenuConfiguration Behavior: DoNotDisplay
Group: Details
Label:
Order:
CascadeConfiguration Assign: NoCascade
Delete: Cascade
Merge: NoCascade
Reparent: NoCascade
Share: NoCascade
Unshare: NoCascade

Many-To-One Relationships

Each Many-To-One relationship is defined by a corresponding One-To-Many relationship with the related entity. Listed by SchemaName.

lk_templatebase_createdby

See systemuser Entity lk_templatebase_createdby One-To-Many relationship.

lk_templatebase_modifiedby

See systemuser Entity lk_templatebase_modifiedby One-To-Many relationship.

team_email_templates

See team Entity team_email_templates One-To-Many relationship.

business_unit_templates

See businessunit Entity business_unit_templates One-To-Many relationship.

system_user_email_templates

See systemuser Entity system_user_email_templates One-To-Many relationship.

lk_templatebase_modifiedonbehalfby

See systemuser Entity lk_templatebase_modifiedonbehalfby One-To-Many relationship.

lk_templatebase_createdonbehalfby

See systemuser Entity lk_templatebase_createdonbehalfby One-To-Many relationship.

See also

About the Entity Reference
Programming reference for Dynamics 365 Customer Engagement
Web API Reference
template EntityType