You should also specify the name of the global scope in which the method should be added:
- Code: Select all
var globalMethod = solutionModel.newGlobalMethod('yourScope', 'function myGlobalMethod() { currentcontroller.newRecord(); }');
If you don't specify a scope name, the method is added in the "globals" scope, but using that scope is discouraged, because those methods can be called using a deeplink which might be a security risk.
Also: When pressing <Alt> when hovering a deprecated method, you'll get a tooltip with an @deprecated tag explaining what to use instead:
![screenshot_deprecated.png](./download/file.php?id=5633&sid=cd2de045e7cb78b08f566c31694aed03)
- screenshot_deprecated.png (10.19 KiB) Viewed 4015 times
Note that using currentcontroller is also deprecated
![Smile :)](./images/smilies/icon_smile.gif)