The main dynamic values in the recorded script for installable cloud apps are "sessionid" and "transactionid". Both values are dynamic, therefore, it is necessary to capture them and save them into variables in the script.
For "sessionid", because all the requests and responses between the client application and PowerServer are tracked by "sessionid", "sessionid" is encrypted in every request/response for security reasons, which makes it impossible to keep track of the value in the script.
Therefore, we will need to set the PowerServer Web APIs to the test mode:
-
"0"- normal mode
-
"1"- test mode: The test mode will allow PowerServer Web APIs to use plain-text session ID. The security will be compromised; please make sure to use the test mode only in the test environment and change back to the normal mode after completing the tests.
Under the test mode and before sessionid is correlated with a variable, the "sessionid" included in the requests is encrypted; and after sessionid is correlated with a variable, the "sessionid" will change to plain text.
Step 1: Open the Applications.json file in the compiled Web APIs > AppConfig folder (or the solution > UserExtensions project > AppConfig folder).
Note that if you store the configurations in the database instead of the file, go to the PowerServer_ApplicationConfig table instead of the Applications.json file.
Step 2: Change the "RunMode" attribute value from "0" to "1".
Step 3: Run PowerServer Web APIs.
Step 4: Run the installable cloud app.
With the "RunMode" set to 1 (test mode), the app will prompt the following warning, and all window titles in the installable cloud app will show "Test Mode".