How to deploy permission set that has ViewAllData
?
There are several orgs that need to have permission set deployed but each org has slightly different list of standard objects enabled or custom objects created.
So it becomes a real pain to deploy this permission sets to all of these orgs at once in bulkified manner.
If I try to retrieve this permission set from an org where there is a custom object belonging to managed package and deploy it to the org where it is missing, I receive the following error
*** Deploying with SOAP API v53.0 ***
Deploy ID: 0Af2i00000nQHYuCAO
DEPLOY PROGRESS | ████████████████████████████████████████ | 0/0 Components
=== Component Failures [1]
Type Name Problem
───── ───────────── ─────────────────────────────────────────────────────────────────────
Error QueryAllFiles In field: object - no CustomObject named Namespace__CustomObject__c found
ERROR running force:source:deploy: Deploy failed.
If I try to deploy the permission set to the org where there are additional Custom objects, I receive another error
*** Deploying with SOAP API v53.0 ***
Deploy ID: 0Af2f00000nMzz2CAC
DEPLOY PROGRESS | ████████████████████████████████████████ | 0/0 Components
=== Component Failures [1]
Type Name Problem
───── ───────────── ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error QueryAllFiles Permission Query All Files depends on permission(s): Read All Custom_Test_Object__c, Read All Custom_Object_test__c, Read Custom_Test_Object__c, Read Custom_Object_test__c
ERROR running force:source:deploy: Deploy failed.