Just a small note about a very small feature just implemented. I have been working with some CRMScript modules, and what was bugging me was that since the modules only have functions (no global code), you cannot click the "Execute" button to test them. If you include global code, it will get executed every time the library is included in a script, which obviously is not what you want.
So, I have added two environment variables (available using getVariable(...)) which are only set when the script is executed using the "Execute script" button in the "Edit script" screen:
- "developmentMode": "true"
- "includeId": the includeId of the current script (to prevent this from getting executed when testing other modules)
This allows you to include some global code in your CRMScript like this:
if (getVariable("developmentMode") == "true" && getVariable("includeId") == "myLibrary")
So, when editing your library, you can click the "Execute script" button and this part will be executed, printing out whatever your function does. When this library is included in some other production code and executed, the code above will not be executed. Hopefully, you will find this useful :) It will become available in 8.5R08.