0

If I have an SOQL query as follows, which returns only 1 field.

String this_soql = 'SELECT SUM(Revenue_Target__c) revenueTarget FROM DM_Account_Plan__c WHERE Id=: the_Id GROUP BY Id';

SObject r = Database.query(this_soql);

Can I then go on to get the 'getDescribe' of that field somehow? Somthing like this perhaps? (which doesnt work)

System.debug(r.getDescribe().isAccessible());

Any advice or suggestions would be greatly appreciated!

Daft
  • 10,277
  • 15
  • 63
  • 105

1 Answers1

0

Found an answer.

You can call the describe method via the SObject's SObjectType like this:

System.debug(r.getSObjectType().getDescribe().isAccessible());
Daft
  • 10,277
  • 15
  • 63
  • 105