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

Include data in salesforce app packages
Hi,
I'm developing a custom app for salesforce. I'm using custom settings to store my default settings. But how can i include these default settings in mijn managed package?
Thanks,
Sten
This isn't currently supported. You can not include records in a package. The standard workaround is to include a class that populates the data in the absence of any other settings, and then have this class called if no settings are found. I would recommend that this ancillary class be designed to be called once, populating org-default values if any values are found missing. This should have the "long first run" effect (like those seen on servers with ASP, where the page is compiled the first time the server runs the page), with minimal impact on subsequent requests.
All Answers
This isn't currently supported. You can not include records in a package. The standard workaround is to include a class that populates the data in the absence of any other settings, and then have this class called if no settings are found. I would recommend that this ancillary class be designed to be called once, populating org-default values if any values are found missing. This should have the "long first run" effect (like those seen on servers with ASP, where the page is compiled the first time the server runs the page), with minimal impact on subsequent requests.
Hmm. Already did this in an other app. Hoped there would be a better solution...
Thanks.