0

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.

1 Answer 1

1

There might be several options.

  1. If there is a small amount of orgs, manually create QAF permission set in every org.

  2. If there is a small number of error patterns, create some QAF permission sets modifications and deploy the QAF PS modification to appropriate orgs.

  3. Develop some complex CI scripts to read dynamically all permissionable objects on the org and update metadata to match the desired modification dynamically.

  4. Deploy empty permission sets to every org. Use click automation tool to repeat the manual steps in every org to enable Query All Files permission and click Save on the confirmation dialog window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.