Custom field not found
Detection
- RegExp:
Error (.*) In field: (.*) - no CustomField named (.*)\.(.*) found
Examples
Error PS_Admin In field: field - no CustomField named User.expcloud__Portal_Username__c found
Resolution
{1} refers to field {3}.{4}, which is not in the target org.
- If you renamed {3}.{4}, search and replace its old name in {1}
- If you deleted {3}.{4}, or do not want to deploy it: list the items in a destructiveChanges.xml file, then sf hardis:project:clean:references --config <that file> removes every reference to them from your sources
- If {3}.{4} must exist: 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 {3}.{4} is a standard field, the target org lacks its feature or license: enable it there, or remove the reference from {1}. The autoCleanTypes of .sfdx-hardis.yml (localfields, datadotcom, caseentitlement, productrequest) remove the usual ones at each save (https://sfdx-hardis.cloudity.com/salesforce-devops-config-cleaning/)