---
schema_version: "1"
id: 1e947aba5b64058b4911de0670464a02e02141a70c95815ef1fcb12864ede302
title: DeleteContext Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_DataSource_DeleteContext.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_DeleteContext.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 236c0abddcb98805766c1d171671b94e3c61f6ecf6bac4861334d467e4de487a
description: An instance of DeleteContext is passed to the deleteRows() method on your Database.Connection class. The class provides context information about the delete request to the implementor of deleteRows().The external IDs of the rows representing external object records to delete.The name of the table to delete rows from.
---
# DeleteContext Class

An instance of DeleteContext is passed to the deleteRows() method on your Database.Connection class. The class provides context information about the delete request to the implementor of deleteRows().

## Namespace

[DataSource](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_DataSource.htm "The DataSource namespace provides the classes for the Apex Connector Framework. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect. Then connect your Salesforce organization to any data anywhere via the Salesforce Connect custom adapter.")

## Usage

The Apex Connector Framework creates context for operations. Context is comprised of parameters about the operations, which other methods can use. An instance of the DeleteContext class packages these parameters into an object that can be used when a deleteRows() operation is initiated.

- **[DeleteContext Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_DeleteContext.htm#apex_DataSource_DeleteContext_properties)**

## DeleteContext Properties

The following are properties for DeleteContext.

- **[externalIds](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_DeleteContext.htm#apex_DataSource_DeleteContext_externalIds)**  
    The external IDs of the rows representing external object records to delete.
- **[tableSelected](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_DataSource_DeleteContext.htm#apex_DataSource_DeleteContext_tableSelected)**  
    The name of the table to delete rows from.

### externalIds

The external IDs of the rows representing external object records to delete.

#### Signature

public List<String\> externalIds {get; set;}

#### Property Value

Type: List<String>

### tableSelected

The name of the table to delete rows from.

#### Signature

public String tableSelected {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")