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
dayaSKdayaSK 

Problem with Custom Setting in managed Package

Hi All,

 

I have some custom setting of type List set up in my development org. I get the values of custom setting in the developement org and my business logic execute properly.

However I am not getting same custom settings values in managed Package .

 

Any pointer please ?

 

Thanks. 

A_SmithA_Smith
When you package custom settings, the data is not included.  You'll have to code for the fact that your data will not necessarily be there at install.  Most people are writing a small routine to populate the settings if none exist first time around.
Chirag MehtaChirag Mehta

@Smith - do you have that small routine to populate the settings if none exist first time around?

Force.comForce.com

Hi Smith,

 

We have to put credentials of external system in the Custom Settings and put it in the managed package. Since data is not included in the managed package, we need to enter a record through code. I wonder whether its secure to put the credentials in apex class. 

 

Is there any other way to create a record in custom setting without generating any security issues.

 

Thanks,

Pragati