Problem
The <objectPermissions> tags are missing from my custom profiles when I pull from a scratch-org using SFDX or MDAPI.
Steps to reproduce
- Create a new Scrach-org.
- Create a custom profile, say "Support".
- Add some Standard Object Permissions to the profiles. Looks like this:
- Use SFDX pull or MDAPI Retrieve.
The Support.profile-meta.xml contains all the settings I added to the profile, except for <objectPermissions>. The missing tag should look like this:
<objectPermissions> <allowCreate>true</allowCreate> <allowDelete>true</allowDelete> <allowEdit>true</allowEdit> <allowRead>true</allowRead> <modifyAllRecords>true</modifyAllRecords> <object>Account</object> <viewAllRecords>true</viewAllRecords> </objectPermissions> If I now push the profile to a new scratch org, then the profile will be missing some permissions such as View All and Modify All since the tags are missing. Looking like this:
Questions
How can I use SFDX or MDAPI to retrieve the missing tags? Or, do some workaround exist?

