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

Feature is available as a developer preview. Feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality developed with these commands or tools in a production environment. You can provide feedback and suggestions for the DataWeave in Apex feature in the Trailblazer Community.

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

Feature is available as a developer preview. Feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality developed with these commands or tools in a production environment. You can provide feedback and suggestions for the DataWeave in Apex feature in the Trailblazer Community.

Note

public Object getValue()

Return Value

Type: Object

getValueAsString()

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

Signature

Feature is available as a developer preview. Feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality developed with these commands or tools in a production environment. You can provide feedback and suggestions for the DataWeave in Apex feature in the Trailblazer Community.

Note

public String getValueAsString()

Return Value

Type: String