+ Start a Discussion
Dima YelizarovDima Yelizarov 

Cannot unset “Default” radio button for custom application using Metadata API

We have a Java utility that uses Metadata API to remove “Default” radio button for our custom application for System Administrator profile, so we can remove this custom application later. Here is a piece of the code that we use:


            Profile profile = new Profile();


            // System Administrator profile



            ProfileApplicationVisibility appVisibility = new ProfileApplicationVisibility();

            appVisibility.setApplication(“Our custom application”);




            UpdateMetadata updateMetadata = new UpdateMetadata();




This worked fine for a long period of time, but recently it stopped working (I suspect after org update to the version #25). After that when we run this util the “visibility” checkbox is unchecked for our custom app, but it remains default. I tried different ways to make this working, including setting default SalesForce apps (i.e. Sales for Site.com) as default or using other appVisibility’s methods, but had no luck. Do someone knows whether I miss something or some other ways how default radio button can be unset?


Thanks in advance!


@Dima - Prior to v25 of the MdAPI -  since every profile has to have one and only one default app (tabset), if you were removing your custom app as the default app for the System Admin profile, what became the default app for this profile? 


BTW, have you filed a case with support so that we can investigate it more completely? If not, please do. Thanks!