Apex class access not found
Detection
- RegExp:
Error (.*) In field: apexClass - no ApexClass named (.*) found
Examples
Error Admin In field: apexClass - no ApexClass named InvoiceController found
Resolution
{1} gives access to Apex class {2}, which is not in the target org.
- Deploy {2}: retrieve it from your org with the Metadata Retriever of VS Code, commit it and save your User Story: sfdx-hardis adds it to manifest/package.xml
- With delta deployments, an item that did not change in the Pull Request is not deployed: change it in the Pull Request, or turn on useDeltaDeploymentWithDependencies (https://sfdx-hardis.cloudity.com/salesforce-devops-config-delta-deployment/)
- Apex class accesses belong in permission sets: the minimizeProfiles cleaning moves them out of profiles (https://sfdx-hardis.cloudity.com/salesforce-devops-work-on-user-story-profiles/)