Skip to main content
Skip table of contents

Data Item

Data items are the result units of database queries. Currently, they are only produced by a set of Salesforce commands that retrieve record data, and in that context each data item represents one record of a query result.

The features of Data items are mostly the same as those of Map values - a Data item is basically an extension of a Map. Each queried field appears as a map entry, with the field's API name as the entry's key and the field's value as the entry's value. Therefore, any value in a Data item can be accessed with expressions of the kind "${record.field}", e.g. "${Opportunity.Amount}". As the Salesforce fields can be of various types, so do the values of these fields inside the Data items represent various types as well. Below is a table describing the relations between the fields and Dynamo's value types.

Salesforce field type

Dynamo value type

Checkbox

Boolean

Number

Number

Currency

Currency

Date

Date

Date/Time

DateTime

Percent

Percentage

Pick-list

Pick-list Value

Pick-list (Multi-Select)

Multipicklist Value

HTML-formatted value / Rich text

HTML Value

Other field types

String

Should the query generating the Data item contain fields of referenced records, e.g. "Opportunity.Account.Name", the Data items of those referenced records actually appear inside the base Data item. So in the case of  "Opportunity.Account.Name", the resulting base Data item would be for Opportunity, but it would contain another Data item for the Account as the value for the key "Account", and so the expression "${Opportunity.Account.Name}" will access the Account Data item from which it retrieves the Name value.

If a record has an undefined/blank value for a field, that field's value will appear in a Data item as null, regardless of the field's type.  

Related commands

  • record, relatedList& query
    These commands are the producers of Data items. Each of them presents a somewhat different way of retrieving information from Salesforce.

Methods

Being an extension of the Map value type, Data item has all the methods of Map in addition to the ones listed here.

getObjectType()

Resolves into a String that is the API name of the object the record represents.

For example, if 'resultRecord' is a Data item produced by a Dynamo clause query, ${resultRecord.getObjectType()} might return "Dynamo_Clause__c".

Using the shorthand form, the expression becomes ${resultRecord.objectType}.  

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.