Why is KnowledgeArticleVersion not in Schema.getGlobalDescribe()?

It's a bit inconvenient that this returns null:

system.debug( Schema.getGlobalDescribe().get('KnowledgeArticleVersion') ); 

While this does not:

system.debug( KnowledgeArticleVersion.getSObjectType().getDescribe() ); 

Replay

This will work for you:

DescribeSObjectResult objType = KnowledgeArticleVersion.getSObjectType().getDescribe();
Map<String, SObjectField> fields = objType.fields.getMap();
Set<String> fieldSet = fields.keySet();

for(String s:fieldSet)
{
    SObjectField fieldToken = fields.get(s);
    DescribeFieldResult selectedField = fieldToken.getDescribe();
    System.debug(selectedField.getName());
}

KnowledgeArticleVersion is not available for Schema.getGlobalDescribe().get().

Category: apex Time: 2013-05-11 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.205 (s). 12 q(s)