Difference between revisions of "EmailTemplate class"

From Catglobe Wiki
Jump to: navigation, search
Line 7: Line 7:
 
|Description=Instanciate an existing template}}
 
|Description=Instanciate an existing template}}
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=string|Name=resourceName|Description=The resource name of existing template|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=parentResourceId|Description=The resource id of existing template}}
+
{{CGscriptParameters_Template|Type=string|Name=name|Description=Name of the new template|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=parentResourceId|Description=The resource id of existing template}}
 
|Description=Create a new template}}
 
|Description=Create a new template}}
 
|Methods=
 
|Methods=
Line 21: Line 21:
 
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=ParentResourceId|HasGetter=1|HasSetter=1|Description=Get the resource id.}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=ParentResourceId|HasGetter=1|HasSetter=1|Description=Get the resource id.}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=PrimaryKey|HasGetter=1|Description=Get the primary id for use in ancient functions.}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=ResourceId|HasGetter=1|Description=Get the resource id.}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=ResourceId|HasGetter=1|Description=Get the resource id.}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=ResourceName|HasGetter=1|HasSetter=1|Description=Get the resource name.}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=ResourceName|HasGetter=1|HasSetter=1|Description=Get the resource name.}}

Revision as of 02:33, 5 December 2016

EmailTemplate



Represents an email account.

Constructors

  • (int resourceId "The resource id of existing template") - Instanciate an existing template
  • (string name "Name of the new template", int parentResourceId "The resource id of existing template") - Create a new template

Methods

  • array GetAllFromParent(int parentResourceId "The resource id of existing template") - Find all mail template that are children on the given resource
  • Empty Save() - Save the Email template
  • string ToString() - The string representation of the object.

Properties

  • DateTime CreatedDate { get; } - Get the time of creation.
  • string MessageDefaultLanguage { get; set; } - Get/Set the default language mail body.
  • DateTime ModifiedDate { get; } - Get the time of last modification.
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ParentResourceId { get; set; } - Get the resource id.
  • int PrimaryKey { get; } - Get the primary id for use in ancient functions.
  • int ResourceId { get; } - Get the resource id.
  • string ResourceName { get; set; } - Get the resource name.
  • string SubjectDefaultLanguage { get; set; } - Get/Set the default language subject.
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

EmailTemplate email = new EmailTemplate(15537524);
number parentRsId = email.ParentResourceId;

EmailTemplate emailNew = new EmailTemplate("BinhTESTNEW", parentRsId);
emailNew.SubjectDefaultLanguage = "newSub";
emailNew.MessageDefaultLanguage = "Newbody";
emailNew.Save();

Result:

Emailtemplate new.jpg