You need to sign in to do that
Don't have an account?
Saving Application Settings
Hello all,
I'm trying to make an application that allows the user to define certain settings and have them be re-used the next time the application is opened. I see that you can define custom settings:
https://login.salesforce.com/help/doc/en/cs_define.htm
But the method for doing so described there requires making changes in the Salesforce UI. I don't want my users to have to muck around with doing so; is there a way to have my application create the custom settings programmatically the first time it is run?
Alternatively is it possible to create a custom database object programmatically, and store the information that way?
Thanks!
If your application uses APEX this shouldn't be too much of an issue, you can:
My application does use APEX - really, the question I meant to ask was how I can do this programmatically with APEX. :) I've seen stuff about how to create and update custom settings and objects, but not how to define new ones.
You can use the Metadata API to define custom settings.
http://www.salesforce.com/us/developer/docs/api_meta/index.htm
Custom Settings are a special type of Custom Object in the system. If you are in Eclipse IDE you can browse your Custom Objects and see your custom settings, and they have special tags which indicate they are custom settings.
eriktown, the apex docs have a whole bunch of methods for changing the values in custom settings
Custom Settings