Skip to content

Latest commit

 

History

History
162 lines (98 loc) · 3.14 KB

File metadata and controls

162 lines (98 loc) · 3.14 KB

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.

Constructors

public Tuple()

SUPPRESSWARNINGS

In order to create a Tuple instance from within a flow, you need a no-arg constructor.

public Tuple(String key, Object value)

standard constructor accepting a key and value

Parameters

Param Description
key String the name of the Tuple's Key.
value Object the Tuple's Value.

Fields

public booleanValueBoolean

AURAENABLED INVOCABLEVARIABLE

public booleansBoolean

AURAENABLED INVOCABLEVARIABLE

public dateTimeValueDatetime

AURAENABLED INVOCABLEVARIABLE

public dateValueDate

AURAENABLED INVOCABLEVARIABLE

public datesDate

AURAENABLED INVOCABLEVARIABLE

public datetimesDatetime

AURAENABLED INVOCABLEVARIABLE

public decimalValueDecimal

AURAENABLED INVOCABLEVARIABLE

public decimalsDecimal

AURAENABLED INVOCABLEVARIABLE

public doubleValueDouble

AURAENABLED INVOCABLEVARIABLE

public doublesDouble

AURAENABLED INVOCABLEVARIABLE

public integerValueInteger

AURAENABLED INVOCABLEVARIABLE

public integersInteger

AURAENABLED INVOCABLEVARIABLE

public keyString

AURAENABLED INVOCABLEVARIABLE

public longValueLong

AURAENABLED INVOCABLEVARIABLE

public longsLong

AURAENABLED INVOCABLEVARIABLE

public sobjectValueSObject

AURAENABLED INVOCABLEVARIABLE

public sobjectsSObject

AURAENABLED INVOCABLEVARIABLE

public stringValueString

AURAENABLED INVOCABLEVARIABLE

public stringsString

AURAENABLED INVOCABLEVARIABLE


Methods

private void determineTypeAndSetCastedValue(Object value)

SUPPRESSWARNINGS

Method is responsible for determining the type of the value and setting the appropriate field.

Parameters

Param Description
value Object the Tuple's Value.

Classes

TupleException

A custom Exception type thrown when the incoming Object is not a recognized Apex-defined-type safe type.

Inheritance

TupleException