9

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.

<tabVisibilities>
    <tab>MyCustomObject</tab>
    <visibility>DefaultOn</visibility>
</tabVisibilities>

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">
<types>
    <members>MyCustomProfile.MyCustomObject</members>
    <name>ProfileTabVisibility</name>       
</types>
<version>33.0</version>

Thanks

2

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".

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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