APIVERSION: 58
STATUS: ACTIVE
Tuple represents a key-value pair. Kinda. Don't come at me math nerds.
You may be asking why this exists, given the existence of Map. Unfortuately Map isn't available everywhere.
Notably, it's not available in Apex-defined Data Types used by Flow/Invocable actions.
Additionally, Object is not a valid data type in Apex-defined Data Types, so we can't use a list of objects
that have a string key, and Object value. This is the next best thing. A kind of polyfill for Map<String,Object>
for use in Apex-defined Data Types.
See also: https://help.salesforce.com/s/articleView?id=sf.flow_considerations_apex_data_type.htm&type=5
Available primitive datatypes available for use in tuple:
Boolean, Integer, Long, Decimal, Double, Date, DateTime, and String. Single values and lists are supported for each data type.
SUPPRESSWARNINGS
In order to create a Tuple instance from within a flow, you need a no-arg constructor.
standard constructor accepting a key and value
| Param | Description |
|---|---|
key |
String the name of the Tuple's Key. |
value |
Object the Tuple's Value. |
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
AURAENABLED
INVOCABLEVARIABLE
SUPPRESSWARNINGS
Method is responsible for determining the type of the value and setting the appropriate field.
| Param | Description |
|---|---|
value |
Object the Tuple's Value. |
A custom Exception type thrown when the incoming Object is not a recognized Apex-defined-type safe type.
Inheritance
TupleException