Record Type not found
Detection
- RegExp:
Error (.*) In field: recordType - no RecordType named (.*) found
Examples
Error Admin In field: recordType - no RecordType named Account.Partner found
Resolution
{1} refers to record type {2}, which is not in the target org.
- If {2} 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. Record types are often missed by a pull: add RecordType to autoRetrieveWhenPull in .sfdx-hardis.yml (https://sfdx-hardis.cloudity.com/salesforce-devops-retrieve/)
- 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} must not exist: 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