---
schema_version: "1"
id: bf7bdab3f31c8dcb84cfdb7d7428ad40eeec5c28e40168907a0e2f7838d59964
title: Result Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_dataweave_Result.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_dataweave_Result.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b1324884318a686d69c0a8af4f4a4530cbbf6a77b4eed5652fe918815b83d21c
description: Contains methods to retrieve data that was transformed using Script class methods.Returns the result of a DataWeave script execution as an object.Returns the result of a DataWeave script execution as a string value.
---
# Result Class

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

## Namespace

[DataWeave](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_dataweave.htm "The DataWeave namespace provides classes and methods to support the invocation of DataWeave scripts from Apex.")

## Example

See [Script Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_dataweave_Script.htm#apex_class_dataweave_Script "Contains the createScript() method to load DataWeave scripts and the execute() method to obtain script output in a DataWeave.Result object.") for an example to run a DataWeave script from Apex and retrieve the resulting script output.

- **[Result Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_dataweave_Result.htm#apex_dataweave_Result_methods)**

## Result Methods

The following are methods for Result.

- **[getValue()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_dataweave_Result.htm#apex_dataweave_Result_getValue)**  
    Returns the result of a DataWeave script execution as an object.
- **[getValueAsString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_dataweave_Result.htm#apex_dataweave_Result_getValueAsString)**  
    Returns the result of a DataWeave script execution as a string value.

### getValue()

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

#### Signature

public Object getValue()

#### Return Value

Type: Object

### getValueAsString()

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

#### Signature

public String getValueAsString()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")