Newer Version Available
Connection Class
Namespace
Usage
Your DataSource.Connection and DataSource.Provider classes compose a custom adapter for Lightning Connect.
Changing the sync method on the DataSource.Connection class doesn’t automatically resync any external objects.
Connection Methods
The following are methods for Connection.
query(queryContext)
Signature
public DataSource.TableResult query(DataSource.QueryContext queryContext)
Parameters
- queryContext
- Type: DataSource.QueryContext
- Represents the query to run against a data table.
Return Value
Type: DataSource.TableResult
search(searchContext)
Signature
public List<DataSource.TableResult> search(DataSource.SearchContext searchContext)
Parameters
- searchContext
- Type: DataSource.SearchContext
- Represents the query to run against an external data table.
Return Value
Type: List<DataSource.TableResult>
sync()
Signature
public List<DataSource.Table> sync()
Return Value
Type: List<DataSource.Table>
Each returned table can be used to create an external object in Salesforce. On the Validate External Data Source page, the administrator views the list of returned tables and selects which tables to sync. When the administrator clicks Sync, an external object is created for each selected table. Also, each column within the selected tables becomes a field in the external object.