Objects rights on a role is below org default
Detection
- String:
access level below organization default
Examples
Error Sales_Manager access level below organization default
Resolution
A role gives a lower access than the organization wide default of the object in the target org.
- In a scratch org, set the default with objectProperties in project-scratch-def.json (see "Set Object-Level Sharing Settings" in https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm)
- In a sandbox or production, deploy the sharing model of the object first (its <sharingModel> in the object file), or set it in Setup -> Sharing Settings
- With delta deployments, an item that did not change in the Pull Request is not deployed: change it in the Pull Request, or turn on useDeltaDeploymentWithDependencies (https://sfdx-hardis.cloudity.com/salesforce-devops-config-delta-deployment/)