Custom JS Helpers
Custom JS Helpers are a component to customize or build JavaScript code snippets. You can build your methods, functions, or code modules use them later while developing.
A developer can build code snippets or modify existing JS helper methods to use in the App designer or server script. Custom JS Helpers allows you to connect your helper code within the groups of the App Designer, debugger, and server.
Custom JS Helpers snippet
Open Custom JS Helpers from Resources → Custom JS Helpers
Click Add button, this will show the editor for adding JS helper.
-
Select group to add JS to the group.
-
Enter the name of the JS helper file.
JavaScript
Add your Javascript into the script editor and on the right panel add your metadata required for the code. In JavaScript editor, right-click and you will get JavaScript helpers. This is pre-made JavaScript and UI5 scripting to ease out the JavaScript development. Just find the right object/method you need and it will be inserted into your JavaScript editor.
Edit JS Helper snippet
Open Custom JS Helpers from Resources → Custom JS Helpers
Select the group and then the JS helper to edit. This action will open the JS Helper configuration.
Click the Edit button and modify the code. Save the changes.
Delete JS Helper snippet
Open Custom JS Helpers from Resources → Custom JS Helpers
Select the group and then the JS helper to delete. This action will open the JS Helper configuration window. Click the Delete button.
Use JS Helpers in App Designer
Open App Designer, select an application or create an application.
Go to JavaScript editor and right click on JavaScript editor, Select Custom → App Designer, this will display the list of custom JS Helper, select your Helper code.
Use JS Helpers in Server Script
Open Server Script from Tools → Server Script
Add Server script configurations and go to a Javascript editor.
Right click on JavaScript editor, Select Custom → Server script, this will display the list of custom JS Helper, Select your Helper code.
Add your code snippet into server script code.