a way to store environment variable for custom package

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

Parents
  • - 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. 

Reply
  • - 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. 

Children