← back to the release
new featureApex

Reduce Overhead by Recompiling Only Invalid Apex Classes and Triggers

Salesforce can now return compilation results for only the Apex classes and triggers with validation errors instead of recompiling the whole org, via the new Tooling API endpoint /tooling/apexCompileResults (POST an empty body) or the 'Compile only invalid classes/triggers' buttons in Setup. Available in API version 68.0 and later. Note: a successful targeted recompile does not flip the affected metadata's isValid field to true.

identifiers
/tooling/apexCompileResultsCompile only invalid classesCompile only invalid triggersisValid
api versions
68.0
flags
enabled by defaultno action requiredmin api 68
how
POST /services/data/v68.0/tooling/apexCompileResults with an empty JSON body; or use the buttons on the Apex Classes / Apex Triggers Setup pages.
who
when
where
Enterprise, Performance, Unlimited, and Developer editions; API 68.0+.
read it on salesforce.com