Can not create an active component
Detection
- RegExp:
Error (.*) You can't create an? (.*) with an active status
Examples
Error Invoice_Assignment You can't create a Assignment Rule with an active status.
Resolution
{1} is a new {2}, and Salesforce does not create it already active.
- Deploy {1} inactive first, then activate it in each org after the deployment: the manual deployment action below reminds it
- Next deployments can keep it active, once it exists in the target org
Deployment action
A deployment action can solve this error. Create it on the Pull Request of the current branch:
sf hardis:project:action:create --agent --scope pr --pr-id current --when post-deploy --type manual --label "Activate {2} {1}" --instructions "1. In Setup, open the page of the {2} items, and open {1}
2. Activate it
3. If it is already active, there is nothing to do"
Documentation: https://sfdx-hardis.cloudity.com/salesforce-devops-work-on-user-story-deployment-actions-manual/