Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The JavaScript execution is designed for integration with "concept types" through two specific script functionalities:

  • Guard Scripts: These scripts act as safeguards for updates to the concepts. They are saved as part of the concept type. They evaluate conditions and determine whether an update should proceed or be rejected.

  • Calculated Fields Scripts: These scripts perform operations such as calculations, concatenations, and other manipulations. The results can then be displayed in the concept.

API Capabilities

The internal JavaScript API exposes several objects and functionalities to the executing scripts, enabling them to interact deeply with the system's internal structures. This interaction includes access to persisted concepts in the current context, master data, the current user, and, in specific cases, the potential future state of a concept (for Guard Scripts) or the fields dependent on calculations (for Calculated Fields Scripts).

...

Code Block
languagejs
let webClient = context.getWebClient("GET", "https://host.com/some-uri");
  • Method: The first argument specifies the HTTP method (GET, PUT, POST, DELETE).

  • URI: The second argument is the URI to which the request will be sent.

Simple waySimple Way

Code Block
languagejs
let webClient = context.getWebClient();

...