I am working with sfdx
Trying to deploy a changed approval process from my sandbox to production
I am getting the approval process with no problems with this command:
sfdx force:source:retrieve -m ApprovalProcess:myCustomObject__c.appProcessName
When I try to deploy with this command:
sfdx deploy -m ApprovalProcess:myCustomObject__c.appProcessName
I always get this error:
The approver null has an invalid type. Replace PreviousApprover with a valid enumeration value.
Of course, the approver in Salesforce UI is filled and have a good and active user in it.
Now when I look into the approval process file, I see that there is a step that it's approver is of type PreviousApprover
and without a name:
This is a very strange behaviour - I cannot find this in the Salesforce documentation and when I change the approver for this step in Saleforce UI and then run the sfdx retrieve command, this PreviousApprover
does not change.
Other approval processes in my sandbox do not have this PreviousApprover
and are deployed successfully.
Also cloning this component also clones the PreviousApprover
and have the same problem
My question is:
Can I fix this approval process?
How can I get this component and deploy it without this problem?