Unable to Retrieve Standard Tabs Visibility into Profiles

Issue #868 resolved
Petr Svestka created an issue

Hi Scott,

We're unable to retrieve Tab visibility for standard Tabs for which there's no sObject, e..g, Home, People, Reports, etc., along with the others.

The SFDC-correct way is to use a package.xml like this:

...
    <types>
        <members>*</members>
        <members>standard-OtherUserProfile</members>
        <members>standard-home</members>
        <members>standard-report</members>
        <name>CustomTab</name>
    </types>
    <types>
        <members>*</members>
        <name>Profile</name>
    </types>
...

While this is correctly processed by an ANT job (with some warnings about it), IC silently fails to retrive the Tab visibility info. It's completely ignored.

Can you have a look quickly and fix it pls?

Thank you.

Kind regards, Petr

Comments (12)

  1. Scott Wells repo owner

    Petr, when you retrieve via IC, are you just retrieving the profiles or have you also selected the custom tabs? When you retrieve profiles and permission sets you must retrieve the things they authorize because otherwise they're sparsely-populated.

  2. Petr Svestka reporter

    Hi Scott, thanks for a quick reply!

    You can use the above snippet as an example of what I'm trying to retrieve via IC (tried module & deps, and context). API 41.0.

    Note there's no sObject behind the "standard-report" Tab, it's just a specific standard Tab in Salesforce, however, you can change it's visibility as usual. And I'm unable to capture such a change via IC.

    Profiles do get retrieved, however, without the respective parts for those standard Tabs.

  3. Scott Wells repo owner

    Ah, okay, and sorry I didn't correlate what you'd added in the description more closely. Unfortunately because of the quirky nature of profile/permission set retrieval, I almost auto-respond to questions that look like they fall into that category.

    I see what you're saying, though...these are metadata entries that aren't included in the API listMetadata('CustomTab') response but are still valid to retrieve and deploy. I've had to implement a similar workaround for StandardValueSet. I'll take a look at doing the same for these.

  4. Scott Wells repo owner

    Petr, I'm doing a little quick searching for the authoritative list of these special tab names. The closest thing I've found in Salesforce's docs is under:

    https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_customapplication.htm

    and it seems far from authoritative. Cobbling together what I have found, it looks like the following should be available, though:

    standard-home
    standard-Chatter
    standard-UserProfile
    standard-OtherUserProfile
    standard-CollaborationGroup
    standard-File
    standard-report
    

    Do you have a good link to documentation on this, or can you comment on the list above? Thanks!

  5. Petr Svestka reporter

    No authoritative list I know of, but I used REST API for /services/data/v41.0/tabs to arrive at a list of all Tab in my Spring '18 Sandbox. Of course, the Tabs will depend on the features enabled in the org. Maybe you can allow anything that starts with "standard-".

    Here's what it gives me (plus a few custom sObject Tabs and custom web Tabs specific to my org):

    standard-Account
    standard-Asset
    standard-Campaign
    standard-Case
    standard-Chatter
    standard-CollaborationGroup
    standard-Console
    standard-Contact
    standard-Contract
    standard-Dashboard
    standard-Document
    standard-DuplicateRecordSet
    standard-File
    standard-Forecasting3
    standard-Idea
    standard-Lead
    standard-Macro
    standard-Opportunity
    standard-Order
    standard-OtherUserProfile
    standard-Pricebook2
    standard-Product2
    standard-ProfilePlatformFeed
    standard-ProfilePlatformOverview
    standard-ProfileSkill
    standard-Quote
    standard-Recognition
    standard-Solution
    standard-StreamingChannel
    standard-UserProfile
    standard-WorkBadge
    standard-WorkBadgeDefinition
    standard-home
    standard-report
    
  6. Scott Wells repo owner

    Okay...I won't be able to turn around a super quick (as in tonight) fix for this. I just returned from a business trip and owe my wife and kids some time this evening! I'll send an email to some of my Salesforce contacts about any authoritative list. I try to offer metadata for selection/inclusion that's valid...otherwise VERY strange things can happen. That's particularly important for users who don't use a package.xml-based metadata subscription Let me see what they say and that will help me determine how best to proceed on this.

  7. Petr Svestka reporter

    No prob Scott :-)

    Found out two things:

    1 those standard Tabs that can be modified in a way, and are modified, and are retrieved, create a file under tabs in addition to adding its visibility to the profile file
    2 unmodified Tabs don't make up a separate file under tabs and so deployment fails with 'An object 'standard-report' of type CustomTab was named in package.xml, but was not found in zipped directory'
    

    So if you have a source to give us an authoritative list and/or behavior, it'll be the best we can do now.

  8. Scott Wells repo owner

    I haven't heard back from Salesforce yet. I'll follow up on that thread today. Even if I hear back it's not something I'll be able to address this weekend because I'm in the process of updating for Spring '18, but one way or the other I'll see if I can get you a fix (even if it's hard-coded for the time-being) next week.

  9. Scott Wells repo owner

    The fix for this will be included in the next build. I'm just using that same REST resource to list the standard tabs in the org and folding that into the CustomTab metadata. I'm now able to retrieve/deploy the standard tab metadata as well as profiles and permission sets that authorize access to those tabs.

  10. Log in to comment