5

I am adding the system permissions 'Manage Public List Views' and 'Create and Customize List Views' to a permission set via the Metadata API. The problem is I can't find their exact API name:

<userPermissions>
    <enabled>true</enabled>
    <name>CreateCustomizeListViews</name>
</userPermissions>
<userPermissions>
    <enabled>true</enabled>
    <name>ManagePublicListViews</name>
</userPermissions>

... this is what I have which seems right, but I want to be absolutely sure. Are you supposed to have the 'and' in there? Previously there was a permission here that read:

<userPermissions>
    <enabled>true</enabled>
    <name>CreateCustomizeFilters</name>
</userPermissions>

... so that's why I named 'Create Customize List Views' that way.

6

Metadata API sometimes have different API names than the one shown on the UI.

Manage Public List Views permission is called as "EditPublicFilters" and Create and Customize List Views is called as "CreateCustomizeFilters"

So your user permission will be.

    <userPermissions>
        <enabled>true</enabled>
        <name>CreateCustomizeFilters</name>
    </userPermissions>
    <userPermissions>
        <enabled>true</enabled>
        <name>EditPublicFilters</name>
    </userPermissions>
  • aha thanks! why is it like that, that's dumb – SallyRothroat Dec 10 '18 at 19:14
  • 1
    This is the core base of Salesforce which was designed in 2000's , probably when they designed they didnt want to name it as "List View" and keep it as Filter. SF Over the years they renamed the Lable to ListView but kept the API name as same for backward compatibility, – Pranay Jaiswal Dec 10 '18 at 19:16
6

The best place to check for it is the workbench.

Enter image description here

Reference: API Names of System and App Permissions?

  • 1
    Its weird, The one I pulled via Ant has value "CreateCustomizeFilters" where as from the API it says PermissionsCreateCustomizeFilters , Unless Permissions is a prefix – Pranay Jaiswal Dec 10 '18 at 19:18
  • 1
    @PranayJaiswal I guess that might be it! – codeyinthecloud Dec 10 '18 at 19:20
  • 4
    @PranayJaiswal Yes, the workbench returns the "SOAP" version of the Profile, which is where the "Permissions" prefix comes from. And it's in the docs for the Profile sobject in the SOAP API, too. – sfdcfox Dec 10 '18 at 19:21
  • @sfdcfox got it. Now makes sense. – Pranay Jaiswal Dec 10 '18 at 19:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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