Newer Version Available
Connection Class
Namespace
Usage
Your DataSource.Connection and DataSource.Provider classes compose a custom adapter for Salesforce Connect.
Changing the sync method on the DataSource.Connection class doesn’t automatically resync any external objects.
Example
Connection Methods
The following are methods for Connection.
deleteRows(deleteContext)
Signature
public List<DataSource.DeleteResult> deleteRows(DataSource.DeleteContext deleteContext)
Parameters
- deleteContext
- Type: DataSource.DeleteContext
- Contains context information about the delete request.
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. Each column within the selected tables also becomes a field in the external object.
upsertRows(upsertContext)
Signature
public List<DataSource.UpsertResult> upsertRows(DataSource.UpsertContext upsertContext)
Parameters
- upsertContext
- Type: DataSource.UpsertContext
- Contains context information about the upsert request.