I have a custom object called MyCustomObject.object and a custom profile called MyCustomProfile.profile

Currently the tab visibility of MyCustomObject is set to "Default On" for MyCustomProfile.


If I set the tab visibility to "Tab Hidden" through the Salesforce UI, the lines above are removed in MyCustomProfile.profile and when I try and deploy this change through the metadata API the change is not reflected (i.e. the tab visibility remains as "Default On")

I was wondering whether you can access tabVisibilities in destructiveChanges.xml and deploy the tab visibility as a destructive change?

I imagine it might look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">


3 Answers 3


You are not deleting anything, hence it's not part of the destructiveChanges. If you want to hide a tab, you should make a regular deployment by specifying "Hidden" instead of "DefaultOn" or "DefaultOff".


Yes, you can. You need to add tabVisibilities metadata to your profile metadata file. For example, you want to add a Custom tab's visibility to DefaultOn, then the metadata will look like this(Copy paste it in your profile metadata file):


Came here looking for solution to a similar problem.

From version 37.0, ProfileTabVisibility will return Hidden, DefaultOn or DefaultOff irrespective of whether the tab visibility was set via API or via UI. For earlier versions, that seemed to be a problem. However, I'm unable to get the metadata when I retrieve

You must log in to answer this question.

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