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.
Make sure that "resolveRefs" and "saveRefs" are set to true. For you basically it should be enough to set "saveRefs" to true for litify_pm__ChildObj2__c. When sfdx cli inserts its (litify_pm__ChildObj2__) records the "saveRefs" flag tells if Ids should be cached (remembered) for use by other objects.
It is very well explained by sfdcfox at What Are saveRefs and resolveRefs?
{
"sobject": "Account",
"saveRefs": true,
"resolveRefs": true,
"files": [
"Accounts.json"
]
}
{
"sobject": "litify_pm__ChildObj2__c",
"saveRefs": true,
"resolveRefs": true,
"files": [
"litify_pm__ChildObj2__cs.json"
]
}
Best Answer
I was able to resolve this issue by updating by sfdx-cli package to the latest version using NPM (npm i sfdx-cli@latest -g) and manually changing the sourceApiVersion value from 43.0 to 44.0 in my sfdx-project.json file. You might start with the sourceApiVersion change first and see if that fixes it, since I'm not sure the CLI update was necessary.