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 (10.19 KiB) Viewed 4888 times
Note that using currentcontroller is also deprecated