ReportTemplate class
Revision as of 08:44, 2 July 2020 by Administrator (talk | contribs)
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