+ 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