Saltar al contendio prinicipal

Embedded Code Editor

Advertencia

Esta página aún no se encuentra traducida al español.

Overview

Developers can use the embedded code editor to write, edit, copy or paste a custom Javascript function wherever this option is available. The editor uses industry-standard text highlighting to facilitate reading and writing code, along with syntax error detection.

The embedded code editor can be found in:

The code editor can also test your code by running the code in a sandboxed environment. Test dummy data is automatically provided for contexts involved in the function.

Attention

The editor does not do test runs on the Custom Javascript Code Routine Stage Bot.

info
  • Asynchronous Javascript functions are allowed.

Initial Layout

To write your code:

initial layout
  1. Choose from the list the available contexts you can gather data from.
  2. Write, edit, copy, or paste your Javascript function in this area.
tip

A. The context is set as a variable.
B & C. Object keys are used to indicate the values to fetch.

JSON Contexts

Before testing your code:

initial layout
  1. Press the Enable Testing button.
  2. The JSON Context area appears with dummy data to be used in the test. If you wish, you can modify the data for the test.
tip

D. The indicated context dummy data appears in the JSON Context area.
E & F. Show the values of the indicated object keys.

Test Function

To test your code:

initial layout
  1. Press the Test Function button.
  2. In the Result area, all the returned data appears.
tip

G & H. The values are passed on to the Result.

info
  • In case of an error, it will appear in the Results area.
  • Errors with context syntaxis will appear in the Function area.
  • If the context or life cycle is changed, all the dummy data will return to its default.