record
Retrieves values of specified fields of a single Salesforce record and stores the data into the variable context as a Data item.
A common companion of record
is relatedList, which offers another relatively simple data retrieval interface. If more complex or efficient data queries are needed, the query command offers the use of freely defined SOQL queries.
Attributes
var | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | No |
Name of the variable that holds the Data item. |
type | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | Yes |
The resolved value of this attribute should be the API name of the target record's object type. |
recordID | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | Yes |
Defines the ID of the record whose data is to be retrieved. |
fields | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | No |
Defines the fields whose values are retrieved. The resolved String should be a comma-separated list of the fields' API names, e.g. "Id, Name, Quantity". If the resolved set of fields contains names of fields that don't exist or otherwise cannot be retrieved, the command will still succeed but the Data item will not contain entries for the "invalid" fields. A warning listing these "invalid" fields is also produced. |
mainRecord | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Boolean | No |
If the value of this attribute is If more than one The default value of this attribute is |
Examples
Use the record
command when you need to get data of a single record whose Id is known.
<record var="mainOpp" type="Opportunity" recordID="${id}" fields="Name, CloseDate, Amount, Description">