Here is my issue: ERROR: Entity of type 'RecordType' named 'Account.Business_Account' cannot be found.
What I did
Converted existing managed package into SF DX project.
The project uses PersonAccount and State and Country/Territory Picklists.
My steps
- Check sfdx version:
$ sfdx -v sfdx-cli/6.1.19 (darwin-x64) node-v9.4.0 $ sfdx plugins no plugins installed
- Create new scratch org, org definition:
{ "orgName": "basepack1", "edition": "Enterprise", "country": "US", "description": "", "hasSampleData": "false", "features": ["PersonAccounts"], "orgPreferences": { "enabled": ["S1DesktopEnabled"] } }
- Before first push check remote status:
$ sfdx force:source:status -r === Source Status STATE FULL NAME TYPE PROJECT PATH Remote Add Account.Business_Account RecordType
- Try to pull even with -f and see the error:
$ sfdx force:source:pull ERROR: Entity of type 'RecordType' named 'Account.Business_Account' cannot be found.
Open scratch org, enable State&Countries, then PUSH project, create new PermSet no problems here.
Check status local and remote:
$ sfdx force:source:status === Source Status STATE FULL NAME TYPE PROJECT PATH Remote Add Account.Business_Account RecordType Remote Add Address Settings Remote Add ScratchPermSet PermissionSet
- Try to pull even with -f flag, same problem.
$sfdx force:source:pull -f ERROR: Entity of type 'RecordType' named 'Account.Business_Account' cannot be found.
What I tried so far:
- Add to .forceignore this line: force-app/main/default/objects/Account/recordTypes/Business_Account.recordType-meta.xml
UPD
I was able to reproduce the issue using clean project. I assume my project is not corrupted and it is a bug.
The issue is in Scratch orgs with Person Account AND Namespace.
Here are the steps:
$ sfdx force:project:create -n geolocation $ sfdx force:config:set defaultdevhubusername=_HubWithNameSpace_ set namespace in sfdx-project.json set Person account feature in project-scratch-def.json $ sfdx force:org:create -f config/project-scratch-def.json --setalias geons --setdefaultusername $ sfdx force:source:status === Source Status STATE FULL NAME TYPE PROJECT PATH Remote Add Account.Business_Account RecordType $ sfdx force:source:pull ERROR: Entity of type 'RecordType' named 'Account.Business_Account' cannot be found. $ sfdx force:apex:class:create -n MyClass $ sfdx force:source:status === Source Status STATE FULL NAME TYPE PROJECT PATH Local Add MyClass ApexClass force-app/MyClass.cls Local Add MyClass ApexClass force-app/MyClass.cls-meta.xml Remote Add Account.Business_Account RecordType $ sfdx force:source:push === Pushed Source STATE FULL NAME TYPE PROJECT PATH Add MyClass ApexClass force-app/MyClass.cls Add MyClass ApexClass force-app/MyClass.cls-meta.xml $ sfdx force:source:pull ERROR: Entity of type 'RecordType' named 'Account.Business_Account' cannot be found.
After that you can ONLY push your changes, BUT will not be able to pull anything from org.
Please share your ideas how to solve this, thanks.
Account.Business_Account
is already referenced in the meta data somewhere. Can you findAll in your source and see if anything comes up?