Skip to main content

In my org it's showing the outdated and invalid classes, I did compile and did not find the related outdated apex classes. Is there a way we can get a quick list of these outdated classes?  

How to identify the invalid and outdate apex classes?

 

 

 

#Salesforce Admin

3 Antworten
  1. Heute 14:58

    Hi @Naresh Kumar Ojha

    , 

    You can run the following in the anonymous window to see the see names of the classes that are invalid:  

     

    List<ApexClass> invalidClasses = [ 

        SELECT Id, Name  

        FROM ApexClass  

        WHERE IsValid = false 

    ]; 

    for (ApexClass cls : invalidClasses) { 

        System.debug('Invalid Class: ' + 

    cls.Name

    ); 

    }

0/9000