Namespace
Usage
Use TemplatesSearchOptions with Wave.Templates class to filter the CRM Analytics template collection returned. For example:
public static void List<String> getAppTemplates() { Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions(); tsOptions.type = 'app'; Map<String, Object> o = Wave.Templates.getTemplates(tsOptions); List<Object> appTemplates = (List<Object>) o.get('templates'); List<String> names = new List<String>(); for (Object templateObj : appTemplates) { names.add((String) ((Map<String, Object>) templateObj.get('name')); } return names; }
TemplatesSearchOptions Properties
The following are properties for TemplatesSearchOptions.
filterGroup
Signature
public String filterGroup {get; set;}
Example
Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions(); tsOptions.filterGroup = 'small';
options
Signature
public String options {get; set;}
Property Value
Type: String
Uses the ConnectWaveTemplateVisibilityOptionsEnum values. Valid values are CreateApp, ViewOnly, and ManageableOnly.
Example
Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions(); tsOptions.options = 'ViewOnly';
type
Signature
public String type {get; set;}
Property Value
Type: String
Uses the ConnectWaveTemplateTypeEnum values. Valid values are app, dashboard, embedded, and lens.
Example
Wave.TemplateSearchOptions tsOptions = new Wave.TemplatesSearchOptions(); tsOptions.type = 'app';