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.
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.
The following are properties for Table.
-
List of table columns.
-
Description of what the table represents.
-
Plural form of the user-friendly name for the table. The
labelPluralbecomes the object’s plural label in the Salesforce user interface. -
Singular form of the user-friendly name for the table. The
labelSingularbecomes 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. -
Name of the table on the external system.
-
Name of the table column that becomes the name field of the external object when the administrator syncs the table.
List of table columns.
public List<DataSource.Column> columns {get; set;}
Type: List<DataSource.Column>
Description of what the table represents.
public String description {get; set;}
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.
public String labelPlural {get; set;}
Type: String
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.
public String labelSingular {get; set;}
Type: String
Name of the table on the external system.
public String name {get; set;}
Type: String
Name of the table column that becomes the name field of the external object when the administrator syncs the table.
public String nameColumn {get; set;}
Type: String
The following are methods for Table.
-
get(name, labelSingular, labelPlural, description, nameColumn, columns)
Returns the table metadata with the specified parameter values.
-
get(name, nameColumn, columns)
Returns the table metadata with the specified parameter values, using the name for the labels and description.
Returns the table metadata with the specified parameter values.
public static DataSource.Table get(String name, String labelSingular, String labelPlural, String description, String nameColumn, List<DataSource.Column> columns)
-
name:
Type: String
Name of the external table.
-
labelSingular:
Type: String
Singular form of the user-friendly name for the table. The
labelSingularbecomes the object label in the Salesforce user interface. -
labelPlural:
Type: String
Plural form of the user-friendly name for the table. The
labelPluralbecomes 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.
Type: DataSource.Table
Returns the table metadata with the specified parameter values, using the name for the labels and description.
public static DataSource.Table get(String name, String nameColumn, List<DataSource.Column> columns)
-
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.
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 |