Salesforce CLI Command Reference
Release Notes
Deprecation Policy
apex get compile-status
apex get log
apex get test
apex list log
apex run
apex run test
apex tail log
apex trace create
apex trace delete
apex trace list
Fetches the compilation status for Apex classes that are currently invalid or have compilation warnings.
Return compile results for only Apex classes and triggers with validation errors or warnings, instead of recompiling the entire org.
Apex compile results are available in API version 68.0 and later. If no Apex compiler issues are found, the command displays a message stating that no results were found.
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
–api-version | N/A | Type: Value Override the api version used for api requests made by this command. |
–json | N/A | Type: Boolean Format output as json. |
–target-org | -o | Type: Value Required Username or alias of the target org. Not required if the target-org configuration variable is already set. |
Fetch invalid Apex classes or classes that have compilation warnings for a target org:
1sf apex get compile-status --target-org me@my.org