You need to sign in to do that
Don't have an account?
A Nikhil
how to update/insert the data through visualforce page in custom settings
I am able to insert the values into custom settings using VF page.I tried to write the code to update the same set of values but I am not able to do so. Could you help us in writing apex code and VF page for updating the custom settings?
Thanks
Nikhil
Thanks
Nikhil
You can insert data into custom settings just like you would do with custom objects.
Example:
These are the details of my Custom Setting:
At this time, I have no records yet for this custom setting:
I created a very simple Visualforce page that lists the fields and a Save button: And the Controller which saves the record to the database: If you open the page, enter the fields and save the record, a new custom settings record will be inserted in the database:
Clicking "Back to List" link will show you the list with the new record:
Hope this helps.
Please mark this as solved if it's resolved.
Regards,
Nagendra.
This code is working fine for inserting the record into custom settings. But I want to retrieve and update the same set of values through VF page.
Thanks
Nikhil
Hi Everyone,
I created a protected hierarchical custom setting named "TGTest__c". Below is the code snippet to create a record in this custom setting using VF Page.
Can anyone help me with updating the custom settings values? As the below code works fine just the first time and does not save if I require a new value.