Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

How to add a global variable to suiteCRM

Hello

Just an observation I made which may help someone save a bunch of time. In my case I was trying to pull in a variable into the class scope and it wouldn’t work.

Solution was to add the global variable to config_override.php file

For example
$sugar_config["str1"] = "this is a string";

Then after repair and rebuild it can be accessed via:
echo $GLOBALS['sugar_config']['str1'];

Video overview:

2 Likes