Set a sugar_config variable during a package install

John Mertic —  October 28, 2013 — 5 Comments

Saw this great question on the forums recently…

I have created a custom package from studio and published (I got a zip file); also this can be installed smoothly in any other installation. But I want to add some custom entries in to sugarcrm config array during installation of this package; how can I achieve this ?

This is actually pretty easy with the the Configurator class interface, which helps avoid trying to manually add the entries to the config_override.php file itself. See the code snippet below, which you could add to a post_execute script

John Mertic

Posts

John Mertic manages the strategic ISV alliances program for SugarCRM, having several years of techincal experience bringing solutions to market with several SugarCRM technology partners. A frequent conference speaker and an avid writer, he has been published in php|architect, IBM Developerworks, and in the Apple Developer Connection, and is the author of the book 'The Definitive Guide to SugarCRM: Better Business Applications' and the book 'Building on SugarCRM: Creating Applications the Easy Way'. He is also president of the OpenSocial foundation, guiding them in solving interoperability issues for enterprise application providers worldwide.

5 responses to Set a sugar_config variable during a package install

  1. 

    I am having an issue with my email blasts going out with an “” at the top.
    Is there a way to prevent this? The test doesn’t show it but when the real email comes in that  is the first thing that appears on the top left hand side.

  2. 

    Andy, will have our support team pick this up. Thanks!

  3. 

    How do I remove a item in array variable config with a pre_uninstall.php script?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s