Reading environment variables
The Desktop SDK includes two classes, ctx.settings
to read the text variables and ctx.cryptography.credentials
to read the credential variables. Reading the environment variables is a two-step process. In the first step, we need to declare the variable with the same name as the name used to create the variable, and the second step is to call the get
method to read the data from Cloud Factory.
Let's first learn about reading the text variable using SiteURL
as an example. Desktop Studio provides a couple of options for inserting the code to declare the variable. You can either use the Insert | Setting | Declare Setting option from the context menu or type setdec
and then press the Tab key.
The following is a code example for declaring the variable:
The name used to create the variable is SiteURL
and so the same name is used to declare the variable in...