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
Shayne0Shayne0 

Post Install Script

Hello,

I'd like to write an Apex Class to use as a Post Install Script for a managed package.  The objective would be to use the class to create sample/default data whenever the package is installed.  Does anyone have an example of how this might be done?

Thanks!
Best Answer chosen by Shayne0
Jason Curtis NBSFDGJason Curtis NBSFDG
Hi, there is a pretty straight forward process for designating a post-install script (as well as an uninstall script) with a (Managed) package. The ISV Force Guide has some good documentation on how to create the class:
http://www.salesforce.com/us/developer/docs/packagingGuide/index_Left.htm#StartTopic=Content/apex_post_install_script_create.htm?SearchType=Stem

Best,

Jason

All Answers

Jason Curtis NBSFDGJason Curtis NBSFDG
Hi, there is a pretty straight forward process for designating a post-install script (as well as an uninstall script) with a (Managed) package. The ISV Force Guide has some good documentation on how to create the class:
http://www.salesforce.com/us/developer/docs/packagingGuide/index_Left.htm#StartTopic=Content/apex_post_install_script_create.htm?SearchType=Stem

Best,

Jason
This was selected as the best answer
Shayne0Shayne0
@Jason

Thanks for the snappy response! This was exactly what I was looking for. Guess I need to brush up on my googling skills along with my Apex!
Jason Curtis NBSFDGJason Curtis NBSFDG
There is so much information out there and in so many different docs, sometimes googling doesn't cut it. Glad to have helped.