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

SalesForce Metadata APIs

I want to rerieve list of Metadata Component's like ApexClass using Salesforce Metadata API's.

I'm getting list of all the Apex Classes(total no is 2246) that are on the Salesforce using the following Code and its taking too much time to retrieve these file names:

ListMetadataQuery query = new ListMetadataQuery(); query.type = "ApexClass"; double asOfVersion = 23.0; // Assume that the SOAP binding has already been established. FileProperties[] lmr = metadataService.listMetadata( new ListMetadataQuery[] { query }, asOfVersion); if (lmr != null) { foreach(FileProperties n in lmr) { string filename = n.fileName; } } 

My requirement is to get list of Metadata Components(Apex Classes) which are developed by my organizasion only so that i can get the Salesforce Metadata Components which are relevant to me and possibly can save my time by not getting all the classes.

How can I Achieve this?

Reply as soon as possible.

Thanks in advance.