I'll answer as I did find some kind of workaround
Those steps allow me to work DX-style with Managed Package, Namespace and Person Account
1 Create scratch org WITHOUT Namespace, using flag -n, --nonamespace
sfdx force:org:create -f config/project-scratch-def.json -a ScratchNONameSpace -s -n
2 First thing is to pull Account.Business_Account, which works as expected
$ sfdx force:source:status -r
=== Source Status
STATE FULL NAME TYPE PROJECT PATH
Remote Add Account.Business_Account RecordType
$ sfdx force:source:pull
=== Pulled SourceSTATE FULL NAME TYPE PROJECT PATH
Add Account.Business_Account RecordType force-app/main/default/objects/Account/recordTypes/Business_Account.recordType-meta.xml
3 Create scratch org WITH Namespace
sfdx force:org:create -f config/project-scratch-def.json -a ScratchWithNameSpace -s
4 Check status, you'll see conflicts
$ sfdx force:source:status
=== Source Status
STATE FULL NAME TYPE PROJECT PATH
Local Add (Conflict) Account.Business_Account RecordType force-app/main/default/objects/Account/recordTypes/Business_Account.recordType-meta.xml
Remote Changed (Conflict) Account.Business_Account RecordType force-app/main/default/objects/Account/recordTypes/Business_Account.recordType-meta.xml
5 Push your code using flag -f, --forceoverwrite
$ sfdx force:source:push -f
=== Pushed Source
STATE FULL NAME TYPE PROJECT PATH
Add Account.Business_Account RecordType force-app/main/default/objects/Account/recordTypes/Business_Account.recordType-meta.xml
$ sfdx force:source:status
=== Source Status
No results found
After that you would be able to push/pull without issues.
I have confirmed with Salesforce support that this is an issue with how the platform handles the API name of the entitlement process. On the backend, Salesforce seems to use the name entirely as lowercase, while we define it with mixed case.
The workaround, for now, is to name the process with no uppercase characters. If the process is named like mydefaultprocess
instead of MyDefaultProcess
, the command works as expected.
I haven't had the confirmation that this is a bug yet ("Tier-3 is still investigating" they say), but to me it seems pretty obvious that this is a bug (otherwise the retrieve
command would retrieve the lowercase fullname instead of the defined fullname).
Known Issue: https://success.salesforce.com/issues_view?Id=a1p3A0000003cqw
Best Answer
I had to remove my duplicate rule and matching rule from my project. This might be a bug in salesforce(not sure).
I tried deactivating the rules but unfortunately could not deploy it. So, try deleting the matchingrule and duplicaterule folders.
Edit: don't forget to delete the references of these rules from sourcePathInfos.json and metadataTypeInfos.json. These files contain matching and duplicate rule paths.