Hi Everyone,
I'm wondering if there is a way to store any environment variable in SugarCRM for my custom package?
For example, I have a API key in my package, and I don't want to write the string directly in my package.
Thanks a lot!
Sophie
Hi Everyone,
I'm wondering if there is a way to store any environment variable in SugarCRM for my custom package?
For example, I have a API key in my package, and I don't want to write the string directly in my package.
Thanks a lot!
Sophie
- If the instance is hosted in the cloud one way of doing it would be ask Sugar if they can set the variabel in the config.
- We used the connector part for it in the past. So we created a 'dummy' connector where we can set the settings we need
- now we use our own configuration module that stores the settings in the configuration for us. Since its a normal module we can change the settings in the ui and hit 'store in config'
- Last but not least you could use the api /Administration/config/:category to set a config variable in the database that you read in your packag when you want.
and which table in the database /Administration/config/:category is refers to,please?
the administration class stores data in the config table. The category is to distinguish your setting for other settings with the same key.
the administration class stores data in the config table. The category is to distinguish your setting for other settings with the same key.
Thanks a lot!
If you want to retrieve the value you should use the Administration class : support.sugarcrm.com/.../