You need to sign in to do that
Don't have an account?

Custom Settings
Hi All,
Can we insert values from VF page to Customsettings?
If anybody has done it Plz..reply ASAP...
Thanks in Advance...
Can we insert values from VF page to Customsettings?
If anybody has done it Plz..reply ASAP...
Thanks in Advance...
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm
MARK it as Best Answer if it solves ur problem
Regards,
Subramani
Trinay technology solutions
go to Setup-->Develop-->Custom Setting-->click on Manage--->if data is available click on Delete Button (or) no data means then leave it....try belo w example...Its working fine here my custom settting :
<pre>
<apex:page controller="customSetting">
<apex:form >
<apex:pageblock title="Content Of Custom Setting ">
<apex:pageBlockSection >
<apex:panelGrid columns="2">
Name :
<apex:inputText value="{!Name}"/>
Phone :
<apex:inputText value="{!Phone}"/>
</apex:panelGrid>
</apex:pageBlockSection>
<apex:commandButton value="Save" action="{!sav}"/>
</apex:pageblock>
</apex:form>
</apex:page>
</pre>
-----------------------------------------------
<pre>
public class customSetting {
public String Name{get;set;}
public String loc{get;set;}
public Integer Phone {get;set;}
Id memId;
public List<HirachicalCst__c> hcsList {get;set;}
public customSetting () {
}
public void sav() {
HirachicalCst__c hcstn= new HirachicalCst__c();
hcstn.Id=memId;
hcstn.Name__c = Name;
hcstn.Phone__c = Phone;
insert hcstn;
}
}
</pre>
----------------------------------------------
Output:
Thanks,
Rockzz