You need to sign in to do that
Don't have an account?
JO_Dev
data results in apex without the SOQL Query
Is there a way in Apex that I can get the results without writing a SOQL Query?
public List<KnowledgeArticleVersion> getArticlesByKeyword(List<KnowledgeArticleVersion> kavListPreFiltered, string keyword)
{
List<KnowledgeArticleVersion> resultList = new List<KnowledgeArticleVersion>();
List<Schema.SObjectType> gd = Schema.getGlobalDescribe().Values();
for(Schema.SObjectType f : gd)
{
if(f.getDescribe().getName().endsWith('__ka'))
{system.debug('---f:'+f);
Map<String, Schema.SObjectField> FieldMap = f.getDescribe().fields.getMap();
for (String FieldName: FieldMap.keySet())
{
system.debug('---fieldMap.get(fieldName).getDescribe().getLabel():'+fieldMap.get(fieldName).getDescribe().getLabel());
}
}
}
return resultList;
}
public List<KnowledgeArticleVersion> getArticlesByKeyword(List<KnowledgeArticleVersion> kavListPreFiltered, string keyword)
{
List<KnowledgeArticleVersion> resultList = new List<KnowledgeArticleVersion>();
List<Schema.SObjectType> gd = Schema.getGlobalDescribe().Values();
for(Schema.SObjectType f : gd)
{
if(f.getDescribe().getName().endsWith('__ka'))
{system.debug('---f:'+f);
Map<String, Schema.SObjectField> FieldMap = f.getDescribe().fields.getMap();
for (String FieldName: FieldMap.keySet())
{
system.debug('---fieldMap.get(fieldName).getDescribe().getLabel():'+fieldMap.get(fieldName).getDescribe().getLabel());
}
}
}
return resultList;
}
@Karanraj
In apex programming, you can retrieve Object data only by the SOQL query. Only the custom settings data can retrieved without writing SOQL query