Retrieves available category groups for objects specified in the request.
DescribeDataCategoryGroupResult[] = connection.describeDataCategoryGroups()(string[] sObjectTypes);
Use this call to describe the available category groups for the objects specified in the request. This call can be used with the describeDataCategoryGroupStructures() call to describe all the categories available for a specific object. For additional information about data categories, see “What are Data Categories?” in the Salesforce online help.
public void describeDataCategoryGroupsSample() { try { // Make the describe call for data category groups DescribeDataCategoryGroupResult[] results = connection.describeDataCategoryGroups(new String[] { "KnowledgeArticleVersion", "Question"}); // Get the properties of each data category group for (int i = 0; i < results.length; i++) { System.out.println("sObject: " + results[i].getSobject()); System.out.println("Group name: " + results[i].getName()); System.out.println("Group label: " + results[i].getLabel()); System.out.println("Group description: " + (results[i].getDescription()==null? "" : results[i].getDescription())); System.out.println("Number of categories: " + results[i].getCategoryCount()); } } catch (ConnectionException ce) { ce.printStackTrace(); } }
public void describeDataCategoryGroups() { try { // Make the describe call for data category groups DescribeDataCategoryGroupResult[] results = binding.describeDataCategoryGroups(new String[] { "KnowledgeArticleVersion", "Question"}); // Get the properties of each data category group
for (int i = 0; i < results.Length; i++) { Console.WriteLine("sObject: " + results[i].sobject); Console.WriteLine("Group name: " + results[i].name); Console.WriteLine("Group label: " + results[i].label); Console.WriteLine("Group description: " + (results[i].description==null? "" : results[i].description)); Console.WriteLine("Number of categories: " + results[i].categoryCount); } } catch (SoapException e) { Console.WriteLine("An unexpected error has occurred: " + e.Message + "\n" + e.StackTrace); } }
| Name | Type | Description |
|---|---|---|
| sObjectTypes | string[] | The specified value can be:
For additional information about articles and questions, see “Managing Articles and Translations” and “Answers Overview” in the Salesforce online help. |