Skip to content

Variable does not exist

Detection

  • RegExp: Error (.*) Variable does not exist: (.*) \((.*)\)

Examples

  • Error AccountService Variable does not exist: accountList (12:8)

Resolution

Apex {1} uses {2} (position {3}), unknown in the target org.
- If {2} is a field, an object or an Apex class of the project, deploy it: 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/)
- If {2} is a typo, fix it in {1}

Comments