This post explains how to get all apex batch class names list in Org.
Result
Example:
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);
}
}
Result
No comments:
Post a Comment