Custom tab not found
Detection
- RegExp:
Error (.*) In field: tab - no CustomTab named (.*) found
Examples
Error Admin In field: tab - no CustomTab named Invoice__c found
Resolution
{1} sets the visibility of tab {2}, which is not in the target org.
- If {2} is a custom tab, 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 standard tab of a feature some orgs do not have, add a replacement rule that removes it before each deployment to the orgs that refuse it (https://sfdx-hardis.cloudity.com/salesforce-devops-config-replacement-rules/):
sf hardis:project:replacement:create --agent --layer project --id remove-unknown-tab --type xml-remove --files "**/profiles/*.profile-meta.xml" --xml-path "Profile/tabVisibilities[tab={2}]" --include-branches TARGET_BRANCH