Table Class

Describes a table on an external system that the Salesforce Connect custom adapter connects to. This class extends the DataSourceUtil class and inherits its methods.

Namespace

DataSource

Usage

A list of table metadata is provided by the DataSource.Connection class when the sync() method is invoked. Each table can become an external object in Salesforce.

The metadata is stored in Salesforce. Updating the Apex code to return new or updated values for the table metadata doesn’t automatically update the stored metadata in Salesforce.

Table Properties

The following are properties for Table.

columns

List of table columns.

Signature

public List<DataSource.Column> columns {get; set;}

Property Value

Type: List<DataSource.Column>

description

Description of what the table represents.

Signature

public String description {get; set;}

Property Value

Type: String

labelPlural

Plural form of the user-friendly name for the table. The labelPlural becomes the object’s plural label in the Salesforce user interface.

Signature

public String labelPlural {get; set;}

DataSource.Table, labelPlural

Property Value

Type: String

labelSingular

Singular form of the user-friendly name for the table. The labelSingular becomes the object label in the Salesforce user interface. We recommend that you make object labels unique across all standard, custom, and external objects in the org.

Signature

public String labelSingular {get; set;}

Property Value

Type: String

name

Name of the table on the external system.

Signature

public String name {get; set;}

Property Value

Type: String

nameColumn

Name of the table column that becomes the name field of the external object when the administrator syncs the table.

Signature

public String nameColumn {get; set;}

Property Value

Type: String

Table Methods

The following are methods for Table.

get(name, labelSingular, labelPlural, description, nameColumn, columns)

Returns the table metadata with the specified parameter values.

Signature

public static DataSource.Table get(String name, String labelSingular, String labelPlural, String description, String nameColumn, List<DataSource.Column> columns)

Parameters

name
Type: String
Name of the external table.
labelSingular
Type: String
Singular form of the user-friendly name for the table. The labelSingular becomes the object label in the Salesforce user interface.
labelPlural
Type: String
Plural form of the user-friendly name for the table. The labelPlural becomes the object’s plural label in the Salesforce user interface.
description
Type: String
Description of the external table.
nameColumn
Type: String
Name of the table column that becomes the name field of the external object when the administrator syncs the table.
columns
Type: List<DataSource.Column>
List of table columns.

Return Value

Type: DataSource.Table

get(name, nameColumn, columns)

Returns the table metadata with the specified parameter values, using the name for the labels and description.

Signature

public static DataSource.Table get(String name, String nameColumn, List<DataSource.Column> columns)

DataSource.Table, get, [String, String, List<DataSource.Column>], DataSource.Table

Parameters

name
Type: String
Name of the external table.
nameColumn
Type: String
Name of the table column that becomes the name field of the external object when the administrator syncs the table.
columns
Type: List<DataSource.Column>
List of table columns.

Return Value

Type: DataSource.Table

The returned table metadata has these property values.
Property Value
name name
labelSingular name
labelPlural name
description name
nameColumn nameColumn
columns columns