1

Salesforce introduced a new setting under system permissions of profiles and permission sets named "View all Custom Settings". I changed this settings in all the profiles to true in my Sandbox and tried to push the profiles to the upper environments. The new setting in the destination org did not get updated. I downloaded all the profiles using data loader, I could not find the API name of this setting. Did anyone faced this before where they could not deploy a newly introduced custom setting between environments.

2 Answers 2

2

I was able to deploy it by including the profile in a package.xml. Retrieving just the profile(s) should bring you userPermissions which View all Custom Settings is a part of.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>Profile Name</members>
    <name>Profile</name>
  </types>
  <version>48.0</version>
</Package>

The retrieval included the following user permission for the profile

<userPermissions>
    <enabled>true</enabled>
    <name>ViewAllCustomSettings</name>
</userPermissions>

I could then use the retrieved profile metadata and package.xml to deploy that profile successfully.

One key is to make sure your target org has Restrict access to custom settings enabled and you're using the latest API version.

Setup --> Schema Settings --> Restrict access to custom settings

1
  • Thanks @Kris. I did not consider the package version. Mar 31, 2020 at 1:44
0

I could not get this permission by adding the profiles to the package.xml. It seems package.xml should include "Custom Settings" too.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>CustomSettings</name>
    </types>
    <types>
        <members>Profile Name</members>
        <name>Profile</name>
    </types>
<version>50.0</version>
</Package>
1
  • Are you certain you're referring to the same permission as mentioned in the question? You only need to include custom settings in the package if you gave a profile specific access to a specified custom setting (Enabled Custom Setting Definitions Access) which appears as <customSettingAccesses> in the profile file. The view all custom settings is a check box under Administrative Permissions and appears as <userPermissions> in the profile file and is always included when retrieving/deploying profiles. Aug 17, 2021 at 15:50

You must log in to answer this question.

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