function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
npat6npat6 

Querying and Apex Class

A colleague of mine, while creating an iOS app (for a proof of concept) which uses the zksForce library, found the following article about querying an Apex Class;

http://wiki.developerforce.com/page/Metadata_Query_Apex_Class

 

I've tried to search around this discussion board and through a web search but can't seem to find any further information around this article/feature (especially around the query on line 16 of the request).

 

I'm wondering if anyone has any further information about this feature, such as;

- how querying an apex class works (because the concept doesn't make sense to me)

- example apex code

- can you pass in parameters (or use a where clause), and if so, how to setup the code and query to do this

 

Thanks,

 

Nathan

Best Answer chosen by Admin (Salesforce Developers) 
Jia HuJia Hu
ApexClass is a standard object for holding the content of Apex classes.
You can query it like any other objects, see doc,
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_apexclass.htm

All Answers

Jia HuJia Hu
ApexClass is a standard object for holding the content of Apex classes.
You can query it like any other objects, see doc,
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_apexclass.htm
This was selected as the best answer
npat6npat6

Thanks a lot Jia.  I thought ApexClass was a generic "insert apex class name here" and you could invoke the methods of the class, rather than a database object that contains all of the details of the classes in the org.

 

Thanks again for clearing it up.