Versions Compared

Key

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

...

For concepts that are instances of "Unit" or known as "Component":

Method

Return Type

Description

getConfigurationArea()

Concept

Retrieves the parent configuration area

Configuration

For concepts that are instances of "Configuration":

Method

Return Type

Description

getComponent()

Concept

Returns the parent component of this configuration.

getConfigurationItems()

List<Concept>

Returns the configuration items of this configuration

Configuration Item

For concepts that are instances of "Configuration Item":

Method

Return Type

Description

getStorageLocation()

StorageLocation

Returns the storage location associated with the configuration item.

StorageLocation Methods

The StorageLocation object provides specific information about where the configuration item is stored:

Method

Return Type

Description

name()

String

Retrieves the name of the storage location.

storageLocationType()

String

Retrieves the type of the storage location.

Accessing Master Data

Scripts have the capability to access and utilize master data, which are tables of fixed data independent of the concept units. Master data provides a stable dataset that scripts can rely on for performing various operations, such as validations and computations.

...

Method

Return Type

Description

key()

String

Retrieves the key identifying this cell in the row.

value()

String

Retrieves the value held by this cell.

Accessing Current User Details

Access via:

Code Block
languagejs
let user = context.getUser();
log.info("User name: " + user.username());

The getUser() method provided by the script context allows access to the current user's information, encapsulated within a User object. This functionality is essential for retrieving user-specific data, which can influence script logic or user experience enhancements.

User Access Methods

The User object represents detailed user information. Here is a breakdown of the methods you can use to access this data directly:

Method

Return Type

Description

id()

String

Retrieves the unique identifier of the user.

username()

String

Retrieves the username of the user.

firstname()

String

Retrieves the first name of the user.

lastname()

String

Retrieves the last name of the user.

email()

String

Retrieves the email address of the user.

firstLogin()

Instant

Retrieves the timestamp of the user's first login.

mostRecentLogin()

Instant

Retrieves the timestamp of the user's most recent login.