How to Get List of Apex Class by using ApextypeImplementor

By | January 18, 2023

It was very tedious apex code to get the List of Apex classes with specific Implementation class. Now Salesforce team is providing the “ApexTypeImplementor” feature. Really, we were waiting eagerly for this feature to arrive and From Spring 23 this feature will be generally available.

ApexTypeImplementor Usage

Below is a sample code to retrieve the List of Apex Classes with particular Implementation class:-

  • As per the below-mentioned query you need to replace “Implementation Class Name” with your Interface class name.
system.debug([SELECT Id, InterfaceNamespacePrefix, InterfaceName, InterfaceApexClassId, IsConcrete, ClassNamespacePrefix, ClassName, ApexClassId, DurableId FROM ApexTypeImplementor where InterfaceName='Implementation Class Name'])

Similarly, for example:- If you want to get the List of Schedulable Apex Class then the below-mentioned code snippet can be used to get all the Schedulable Apex classes present in the org. This can be done by adding the filter as per your requirement. 

system.debug([SELECT Id, InterfaceNamespacePrefix, InterfaceName, InterfaceApexClassId, IsConcrete, ClassNamespacePrefix, ClassName, ApexClassId, DurableId FROM ApexTypeImplementor where InterfaceName='Scheduable']);

Similarly, for example:- If you want to get the List of Batchable Apex classes then the below-mentioned code snippet can be used to get all the Batchable Apex classes present in the org. This can be done by adding the filter as per your requirement. 

system.debug([SELECT Id, InterfaceNamespacePrefix, InterfaceName, InterfaceApexClassId, IsConcrete, ClassNamespacePrefix, ClassName, ApexClassId, DurableId FROM ApexTypeImplementor where InterfaceName='Batchable']);

By following the above blog instructions, you will be able to “How to Get List of Apex Class by using ApextypeImplementor“. If you still have queries or any related problems, don’t hesitate to contact us at salesforce@greytrix.com. More details about the Product are available on our website and Salesforce AppExchange.

We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please get in touch with us at salesforce@greytrix.com.

About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.

Greytrix has some unique solutions for Cloud CRM such as Salesforce Sage integration for Sage X3Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data MigrationIntegrated App developmentCustom App development and Technical Support to business partners and end users.
Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star rated app listed on Salesforce AppExchange.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our Salesforce products and services, contact us at salesforce@greytrix.com. We will be glad to assist you.

Related Posts: