Loading

View or Update Salesforce Object Permissions via the Developer Console

Udgivelsesdato: Jun 11, 2025
Beskrivelse

In Salesforce, a permission set may show "View All Records" or "Modify All Records" object permissions on a Platform Event or object, but there is no option to disable these permissions from the standard Setup user interface. This article explains how to use the Salesforce Developer Console to directly query and update the ObjectPermissions object using SOQL (Salesforce Object Query Language) to resolve this limitation.

Løsning

This limitation occurs because some object permission settings on Platform Events are not editable through the standard Setup interface. The Developer Console Query Editor provides direct access to the ObjectPermissions data to make these changes.

Required Information Before You Begin

You need two values to run the query:

  • SobjectType: The API name of the target Object or Platform Event (for example, Create_Contact__e for a Platform Event, or Account for a standard object).
  • ParentId: The ID of the target Permission Set. See the Additional Resources section for how to find a Permission Set ID

 

Steps to Update Object Permissions

 

  1. Open the Developer Console.
    1. Salesforce Classic: Click Your Name, then select Developer Console.
    2. Lightning Experience: Click the Setup gear icon (quick access menu), then select Developer Console.
  2. Choose the Query Editor tab.
  3. Enter your query using your SobjectType and ParentId values. For example, to query a Platform Event named Create_Contact__e on a Permission Set with ID 0PS2E000002Iw7a: SELECT Id, ParentId, SobjectType, PermissionsViewAllRecords, PermissionsModifyAllRecords FROM ObjectPermissions WHERE SobjectType = 'Create_Contact__e' and ParentId = '0PS2E000002Iw7a'
  4. Click the Execute button.
  5. Double-click on the row of the column you want to update. Make your changes.
  6. Click the Save Rows button.

 

Note

Standard Objects: Refer to the Object Reference for Salesforce and Force.com documentation to find the API name. Custom Objects: Review the Naming Conventions for Custom Objects section of the Developer Documentation. Platform Events: The API name can be found on the Platform Event setup page in Setup.

There is an existing Known Issue — "Unable to assign permission set to users due to View All being enabled on Platform events" — that uses these steps as the recommended workaround.

Vidensartikelnummer

000389259

 
Indlæser
Salesforce Help | Article