Announcements
Hello everyone!
I have a question regarding best practices of storing environment-related variable values. I have two environments: Prod and Sandbox, both utilize GeneratedFilePath variable, which stores the path, where the new generated file will be located. This path is different for two environments and I am qurious where is better to place those values is code?
I haven't found different config areas in app.json file, is it possible to make configuration though config files, or do I need to create some code units, check current env and return proper value?
Thanks for all your replies, guys!
Hi, you can also get the environment name directly in your method, and then add the condition.
More details: https://yzhums.com/8271/
Hope this helps as well.
Thanks.
ZHU
I will agree to Inge, to use a setup tables as a storage of your variables e.g. setup links, urls, credentials and your requirements.
Even if you install an app from extension marketplace, You will notice that there variable values are placed into their respective table setups.
If you find this useful please give it a like or verify the answer. By this way you can help other members know that the topic has been answered. Have a nice day. Thank you.
Cheers,
I think it would be best if you created a setup table for your functionality and stored the filepath in that setup table.
Then you can get that setup when you need it in the rest of your code and it is not hard coded anywhere in case it changes,
André Arnaud de Cal...
294,137
Super User 2025 Season 1
Martin Dráb
232,877
Most Valuable Professional
nmaenpaa
101,158
Moderator