Posts

Showing posts with the label batch class

How to See All Batch Apex Classes in a Salesforce Org?

Image
Running this code in the Developer Console anonymous window will give you the list of all batch apex classes in your Salesforce org. list<ApexClass> lstApexClasses = [SELECT Id, Name, ApiVersion, Body FROM ApexClass where NamespacePrefix = null]; for(ApexClass iterator : lstApexClasses) {     if(iterator.Body.contains('Database.Batchable')) {         system.debug('Batch Class Name ====> '+iterator.Name+' Api Version ====> '+iterator.ApiVersion);     } } After executing the code, open the log and the result will be like