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
CuriousJohnCuriousJohn 

Can you include data records in a managed package?

I want to include a Custom Setting in a package **and** two instances (records) of the Custom Settings Object. Is that possible?

Sridhar BonagiriSridhar Bonagiri

Hi,

 

You can include Custom settings object in a managed package. But you cannot include data of the Custom Settings object, to achieve this you need to write some custom apex code.

 

Regards,

Sridhar Bonagiri

Devendra@SFDCDevendra@SFDC

Hi,

 

Shridhar is correct. You can not add data into managed package.

 

But you can try post install script. After installation of managed package salesforce will execute the script to create your data.

 

Follow the below link for more details.

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_install_handler.htm

 

Thanks,

Devendra

danny.panzer1.3959457349003699E12danny.panzer1.3959457349003699E12
Devendra, this link appears to be broken...
Christopher D. EmersonChristopher D. Emerson
Is this the link (or current day version of it)?
https://docs.releasenotes.salesforce.com/en-us/spring16/release-notes/rn_deployment_sandbox_postcopy_script.htm 
Shailesh BhideShailesh Bhide
Use this link
https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/apex_post_install_script.htm