You need to sign in to do that
Don't have an account?

Can one query get fields I need for whatever the Task object WhoID field equals?
ive used the describe methods when I know I want information for a case, for example:
Schema.DescribeSObjectResult caseObj = Case.sObjectType.getDescribe(); Map<String, Schema.SObjectField> caseObjFields = caseObj.fields.getMap(); string caseSOQL = 'Select '; for (String fieldName : caseObjFields.keySet()){caseSOQL += fieldName + ',';} caseSOQL = caseSOQL.substring(0,caseSOQL.length()-1);
what if i want to be able to get to the fields for any object related to a task?
for example there are 20 objects related to the task object in our Org and i wouldnt want to write 20 describe methods, besides for that probably goes over the govenor limit for describe calls.