...
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).
External calls - Work in progress
The javascript api will soon have the capability to make authenticated calls to external systems. The authentication method and credentials for different external systems will be defined during system start. This part of the javascript api is yet to be finished. The documentation will be updated when this functionality is available.
Expected Return Values for Guard Scripts
...
Structure of the GuardResult Object
Field | Type | Description |
---|---|---|
|
| Indicates whether the update should proceed. |
|
| A brief title summarizing the guard's outcome. |
|
| A detailed explanation of the decision. |
|
| List of properties that influenced the decision. |
AffectedProperty Record
Field | Type | Description |
---|---|---|
|
| Explanation of how the property was affected. |
|
| The identifier of the affected property. |
Example Use Cases
Success = True: The update is allowed to proceed, and no details are shown to the user since the operation complies with all rules.
Success = False: The update is blocked. The details specified in the
GuardResult
object, such astitle
,reason
, and information aboutaffectedProperties
, will be displayed in the UI to inform the user precisely why the update was not permitted.
...