Test a script

❗

Warning

A test run is not a simulation. If the script updates fields or sends requests to an external service, the updates and requests will occur on the record you use. Use a test record to test the script.

We recommend setting ScriptResult.Message at each point where your script can fail, so your tests can provide error message names that describe the step that failed.

  1. Click the Test script button.
  2. Before the test window opens, Orange Logic checks the script's syntax. If the check fails, a message appears describing the first syntax error. Fix that error, and then click Test script again.
  3. If the syntax is correct, the Test script on document window opens. Select your test record in the Asset selection field. The field lists only assets that you have permission to edit. The field also keeps your most recent selection, even when you open a different script, so confirm the asset before you continue.
  4. Click Execute to run the script on the selected record. Executing the script triggers only the script, not the workflow that contains the script. If the run succeeds, a notification appears. If the run fails, an error message shows the text that the script returned.
  5. If the script fails and you can’t determine the issue, click Execute with debug recording. When the script finishes, the Debug recorded window opens, so you can download the recording as a zip file. Your Orange Logic super admin can submit a support request and include the debug recording for Orange Logic’s support team to investigate.

Test your script on a test record

Notes


Did this page help you?