Loading

Compilation error while referring an object in Apex code "Invalid Type: {className}"

Julkaisupäivä: Feb 24, 2023
Kuvaus
Sometimes, when an object is being used in Apex code, there are situations where you might encounter compilation errors in the code with the below message: Invalid Type: {className}
Ratkaisu
When Invalid Type: {className} error is shown during compilation, the most probable cause is due to the incompatible API Version. It can be resolved by changing the
  1. API Version (Available at the top left corner, if using the Developer Console to view the class) OR
  2. "Salesforce.com API" value in the "Version Settings", if using the Apex Classes section from the Org Setup.
Knowledge-artikkelin numero

000394713

 
Ladataan
Salesforce Help | Article