PREVIOUS | NEXT
Add New Script
Create New Script
[Back to top]
To create a new script go to Setup > Development > Scripts and:
Select the Script option from the New menu, or click the Create New link from the instructional text on the Scripts workspace.
Select the Expand icon to expand or collapse additional fields.
Complete the form fields:
Use the reference tools on the right side of the workspace to look up objects and methods you can use in your script. Available methods and objects are limited based on the script type you selected.
Write your script in the Code window using the Groovy scripting language. To enter full-screen mode, place your cursor in the Code window and press F11. To exit the full-screen mode, press F11 or Esc.
Select Debug to open the Debug workspace where you can troubleshoot the script. See Debug Tool for more information. Select the category in the Debug tool to ensure the information from the script is recorded.
Select Validate to check the code syntax. Workflow displays the results of the script execution in the Output tab below the Code window.
Click Save as Draft to save your work without exiting. Workflow saves your script alphabetically in the ROOT folder. You can drag and drop the script into another folder. See Manage Folders and Scripts for more information.
- Click Save and Publish to save your changes and publish the script.