Skip to content

No such column on entity

Detection

  • RegExp: Error (.*) No such column '(\w+)' on entity '(\w+)'

Examples

  • Error InvoiceService No such column 'Amount__c' on entity 'Invoice__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name.

Resolution

Apex {1} queries field {2} of {3}, which the target org does not have.
- Deploy field {3}.{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/)
- Check the API name (__c suffix, namespace prefix). If {2} is a standard field, enable its feature in the target org

Comments