Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

EmailTemplate TemplateGetAllFromParent

From Catglobe Wiki


EmailTemplate_TemplateGetAllFromParent

Return an array containing all email templates

An array which contains email templates objects. for infomation click here;


Syntax

EmailTemplate_TemplateGetAllFromParent(parentResourceId);

Arguments

  • parentResourceId: is number. It is parent resource id where contains email templates

Return value

array

Examples

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

array emailTemplates=EmailTemplate_TemplateGetAllFromParent(parentRsId);

for(number i=0;i< emailTemplates.Count;i++) 
 {
 print(emailTemplates[i].CreatedDate);
 print(emailTemplates[i].ModifiedDate);
 print(emailTemplates[i].ObjectTypeName);
 print(emailTemplates[i].ResourceId);
 print(emailTemplates[i].ParentResourceId);
 print(emailTemplates[i].SubjectDefaultLanguage);
 if(i==emailTemplates.Count-1){
 emailTemplates[i].SubjectDefaultLanguage = "SUBTEST";
 emailTemplates[i].Save();
 print(emailTemplates[i].SubjectDefaultLanguage);
 }

 print("==============================");
 }
//result:

2016-03-24 02:25:18
2016-03-24 02:36:43
EmailTemplate
15532546
15532172
Invitation til unders&oslash;gelse
==============================
2016-05-31 03:05:25
2016-05-31 03:09:38
EmailTemplate
15537524
15532172
Invitation til unders&oslash;gelse
==============================
2016-10-26 03:57:45
2016-10-27 08:54:55
EmailTemplate
15544386
15532172
SubNew
SUBTEST
==============================