Newer Version Available

This content describes an older version of this product. View Latest

Result Class

Contains methods to retrieve data that was transformed using Script class methods.

Namespace

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms. You can provide feedback and suggestions for the DataWeave in Apex feature in the Trailblazer Community. The beta release of DataWeave in Apex supports packaging of DataWeave scripts within a namespace. However, you can only access scripts within a package, not across different namespaces.

Note

DataWeave

Example

See Script Class for an example to run a DataWeave script from Apex and retrieve the resulting script output.

Result Methods

The following are methods for Result.

getValue()

Returns the result of a DataWeave script execution as an object.

Signature

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms. You can provide feedback and suggestions for the DataWeave in Apex feature in the Trailblazer Community. The beta release of DataWeave in Apex supports packaging of DataWeave scripts within a namespace. However, you can only access scripts within a package, not across different namespaces.

Note

public Object getValue()

Return Value

Type: Object

getValueAsString()

Returns the result of a DataWeave script execution as a string value.

Signature

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms. You can provide feedback and suggestions for the DataWeave in Apex feature in the Trailblazer Community. The beta release of DataWeave in Apex supports packaging of DataWeave scripts within a namespace. However, you can only access scripts within a package, not across different namespaces.

Note

public String getValueAsString()

Return Value

Type: String