Describe​DataCategoryGroupStructureResult Class

Contains the category groups and categories associated with KnowledgeArticleVersion and Question.

Namespace

Schema

Usage

The describeDataCategoryGroupStructures method returns a list of Schema.Describe​DataCategoryGroupStructureResult objects containing the category groups and categories associated with the specified object.

For additional information and code examples, see Accessing All Data Categories Associated with an sObject.

Example

The following is an example of how to instantiate a data category group structure describe result object:
List <DataCategoryGroupSobjectTypePair> pairs = 
      new List<DataCategoryGroupSobjectTypePair>();

DataCategoryGroupSobjectTypePair pair1 = 
      new DataCategoryGroupSobjectTypePair();
pair1.setSobject('KnowledgeArticleVersion');
pair1.setDataCategoryGroupName('Regions');

DataCategoryGroupSobjectTypePair pair2 = 
      new DataCategoryGroupSobjectTypePair();
pair2.setSobject('Questions');
pair2.setDataCategoryGroupName('Regions');

pairs.add(pair1);
pairs.add(pair2);

List<Schema.DescribeDataCategoryGroupStructureResult>results = 
      Schema.describeDataCategoryGroupStructures(pairs, true);

DescribeDataCategoryGroupStructureResult Methods

The following are methods for DescribeDataCategoryGroupStructureResult. All are instance methods.

  • getDescription()
    Returns the description of the data category group.
  • getLabel()
    Returns the label for the data category group used in the Salesforce user interface.
  • getName()
    Returns the unique name used by the API to access to the data category group.
  • getSobject()
    Returns the name of object associated with the data category group.
  • getTopCategories()
    Returns a Schema.DataCategory object, that contains the top categories visible depending on the user's data category group visibility settings.

getDescription()

Returns the description of the data category group.

Signature

public String getDescription()

Return Value

Type: String

getLabel()

Returns the label for the data category group used in the Salesforce user interface.

Signature

public String getLabel()

Return Value

Type: String

getName()

Returns the unique name used by the API to access to the data category group.

Signature

public String getName()

Return Value

Type: String

getSobject()

Returns the name of object associated with the data category group.

Signature

public String getSobject()

Return Value

Type: String

getTopCategories()

Returns a Schema.DataCategory object, that contains the top categories visible depending on the user's data category group visibility settings.

Signature

public List<Schema.DataCategory> getTopCategories()

Return Value

Type: List<Schema.DataCategory>

Usage

For more information on data category group visibility, see “Data Category Visibility” in the Salesforce online help.