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.

ReportTemplate class

From Catglobe Wiki
Revision as of 07:44, 2 July 2020 by Administrator (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ReportTemplate



A report template

Parent class

Inherits from object

Constructors

  • (int resourceId "ResourceId of existing template") - Fetch existing template
  • (string name "Resource name", int parentResourceId "Parent resource") - Create new template

Methods

  • Empty DefaultLanguage(string isocode "Iso code to set as default") - Which content is the default
  • Empty Save() - Save the template
  • (From object) string ToString() - The string representation of the object.

Properties

  • Dictionary LocalizedContent { get; set; } - Localized content of the template
  • string Name { get; } - Name of the template
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ResourceId { get; } - Resource Id of the template
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • string ViewUrl { get; } - Url to use to view template


Examples

//Create new report template:
ReportTemplate rt = new ReportTemplate ("Antest1",11088827);
Dictionary content = {
 "da-DK":"content in DK",
 "en-US":"content in US"
};
rt.LocalizedContent=content;
rt.DefaultLanguage("en-US");
rt.Save();
print(rt.ResourceId);//15550190
//Get an existing report template:
ReportTemplate rt = new ReportTemplate (15550190);
print(rt.ViewUrl);///CatglobeInABox/#Cross/15550190
print(rt.ResourceId);//15550190
print(rt.Name);//Antest1