Difference between revisions of "ResourceTemplateHelper"
Nguyenduyan (talk | contribs) |
|||
Line 7: | Line 7: | ||
{{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllBulkMailTemplates|Description=Get all templates of the given type}} | {{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllBulkMailTemplates|Description=Get all templates of the given type}} | ||
{{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllBulkSmsTemplates|Description=Get all templates of the given type}} | {{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllBulkSmsTemplates|Description=Get all templates of the given type}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllFolderTemplates|Description=Get all templates of the given type}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllQuestionnaireTemplates|Description=Get all templates of the given type}} | ||
{{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllTemplates|Parameters= | {{CGscriptMethods_Template|ReturnType=Array of objects|Name=GetAllTemplates|Parameters= | ||
{{CGscriptParameters_Template|Type=int|Name=resourceType|Description=RESOURCE_TYPE_x to determine which list of resource templates to get}} | {{CGscriptParameters_Template|Type=int|Name=resourceType|Description=RESOURCE_TYPE_x to determine which list of resource templates to get}} | ||
|Description=Get resource templates specified by the resource type constant}} | |Description=Get resource templates specified by the resource type constant}} | ||
+ | {{CGscriptMethods_Template|ReturnType=ResourceTemplate|Name=GetTemplate|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=resourceId|Description=Resource Id}} | ||
+ | |Description=Get resource templates specified by the resource id}} | ||
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} | ||
|Properties= | |Properties= |
Revision as of 09:53, 15 November 2016
ResourceTemplateHelper
Helper class for fetching information about resource templates
Constructors
- () - Make new helper
Methods
- Array of objects GetAllBulkMailTemplates() - Get all templates of the given type
- Array of objects GetAllBulkSmsTemplates() - Get all templates of the given type
- Array of objects GetAllFolderTemplates() - Get all templates of the given type
- Array of objects GetAllQuestionnaireTemplates() - Get all templates of the given type
- Array of objects GetAllTemplates(int resourceType "RESOURCE_TYPE_x to determine which list of resource templates to get") - Get resource templates specified by the resource type constant
- ResourceTemplate GetTemplate(int resourceId "Resource Id") - Get resource templates specified by the resource id
- string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
array list={
Resource_Type_BulkSms
};
ResourceTemplateHelper a;
array s=a.GetAllTemplates(list[0]);
print(s);
for(number i=0;i<s.Count;i++)
{
print("-----------");
BulkSMSResourceTemplate n=s[i];
print(n.ResourceId);
print(n.ResourceName);
print(n.LocalizedNames);
};
BulkSMSResourceTemplate templates=new BulkSMSResourceTemplate("Test bulk mail new SMS");
templates.IsBulkDependant =true;
templates.DependantSendToPartly = true;
templates.DependantSendToCompleted = true;
templates.DependantSendToNotStarted = true;
templates.LocalizedNames = {"da-DK": "Test bulk mail"};
templates.DefaultLanguage("da-DK");
templates.Save();
print("-----------");
print(templates.ResourceId);
print(templates.ResourceName);
print(templates.LocalizedNames);