function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RIteshMRIteshM 

When deleting Custom setting getting error

i am trying to delete a custom setting named as LAB_Google_API_Settings__c .when i try to delete it is showing a page and message that

 

This custom object is used by another feature. Remove the usage and try again. and that another feature is a Visualforce Page . my page code is 

 

<apex:page controller="Mirror_Settings_Controller">

<apex:form id="pageBlock1" rendered="{! IF($Profile.Name !='System Administrator',false,true)}">
<!-- redirect to custom settings configuration -->
<apex:pageMessages id="theMessages"/>
<apex:pageBlock title="Google Glass Configuration" rendered="{!(!apiSettingsReady || editApiSettings)}" >
<apex:pageBlockButtons location="top">
<apex:commandButton value="Save" action="{!saveGoogleSettings}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Client Id"/>
<apex:inputText value="{!apiSettings.ClientId__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Client Secret"/>
<apex:inputText value="{!apiSettings.ClientSecret__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Scope"/>
<apex:inputText value="{!apiSettings.Scope__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Redirect Uri" />
<apex:inputText value="{! apiSettings.RedirectUri__c}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:form id="pageBlock2" rendered="{! IF($Profile.Name !='System Administrator',false,true)}">
<apex:pageBlock title="Google Glass Configuration" rendered="{! (apiSettingsReady && !editApiSettings)}" >
<apex:pageBlockButtons location="top">
<apex:commandButton value="Authenticate" action="{!authorizeApp}"/>
<apex:commandButton value="Edit" action="{! editApiSetting}" reRender="pageBlock1,pageBlock2"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Client Id"/>
<apex:outputText value="{!apiSettings.ClientId__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Client Secret"/>
<apex:outputText value="{!apiSettings.ClientSecret__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Scope"/>
<apex:outputText value="{!apiSettings.Scope__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Redirect Uri" />
<apex:outputText value="{! apiSettings.RedirectUri__c}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:form id="pageBlock3">
<!-- redirect to custom settings configuration -->
<apex:pageBlock title="User's Credentials" rendered="{!IF(userSettings !=null, true, false)}" >
<apex:pageBlockButtons location="top">
<apex:commandButton value="Delete" action="{! deleteUserSettings}" reRender="pageBlock1,pageBlock3"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputLabel value="Access Token"/>
<apex:outputText value="{!userSettings.Access_Token__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Refresh Token"/>
<apex:outputText value="{!userSettings.Refresh_Token__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Validation Time(in Seconds)"/>
<apex:outputText value="{!userSettings.Expire_Duration__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Last Modified" />
<apex:outputText value="{! userSettings.LastModifiedDate}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>

</apex:page>

 

the thing that is surprising me is no Apex class is showing as component and i am unable to figure it out where i used this custom setting in visualforce page.if some variable are shown then it also show in Controller.it is giving me error only on visualforce page.please guideline how to delete this custom setting ??

 

Best Answer chosen by Admin (Salesforce Developers) 
Vinita_SFDCVinita_SFDC

Hi,

 

Please check if the custom setting is an installed managed package. A Installed Managed Package Icon icon indicates that the custom setting is in an installed managed package. You can’t edit or delete a custom setting installed from a managed package.