0

A bit of background: Project currently have a need to implement the Salesforce Shield solution in a project, and currently the Enterprise/Unlimited/etc. scratch orgs do not support this feature. The workaround we have determined is to use developer scratch orgs for any field creation/modification/etc in order to ensure that the encryption settings are preserved and can be tested.

Root of the problem: When pushing to a developer org, by default the case OWD is set to public read/write, which causes issues with the roles that have been configured as they have the <caseAccessLevel>none</caseAccessLevel> flag. I get the error of "Case access is below the organization default" error, even when we push the case metadata and it gets set to private. My assumption that the OWD is being set after the roles are pushed.

I am are currently using a .bat for scratch org creation, and I was hoping that there is a way to selectively deploy one file/folder to a scratch org to ensure that the OWD for cases is updated before trying to push the roles.

1 Answer 1

5

You can't really selectively push, but you could selectively deploy, which is probably as good as it's going to get for now. You can do something like sfdx force:source:deploy -p force-app/main/default/objects then sfdx force:source:push -f to get everything in sync. A better solution would be to have the DX team fix it, if that's possible. Ideally we should be able to push this in one go without these sorts of dependencies. You might want to post on the Salesforce DX group to leave feedback.

2
  • Can you use the sfdx force:source:deploy to target one object folder? For example the case object?
    – sevargdcg
    Apr 2, 2019 at 19:59
  • 2
    @sevargdcg Sure, you can specify any path with -p, such as sfdx force:source:deploy -p force-app/main/default/objects/Case if you desire. It can be as granular as a single file, or any number of nested folders.
    – sfdcfox
    Apr 2, 2019 at 20:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .