# Delete Record

> `UiPath.OracleNetSuite.Activities.DeleteRecord`

`UiPath.OracleNetSuite.Activities.DeleteRecord`

The **Delete Record** activity uses the NetSuite [delete](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3486046.html) operation to delete a specific record (**internalid**).

After deleting the record, the activity outputs the status of the request (success/failure information) in a `ResponseStatus` object (**NetSuiteStatus**) that you can use in subsequent activities (e.g., conditional logic).

## How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

1. Complete the [Setup](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) steps.
2. Add the [Oracle NetSuite Application Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-scope) activity to your project.
3. Add the **Delete Record** activity inside the **Oracle NetSuite Application Scope** activity.
4. Enter values for the [Input](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-delete-record#delete-record) properties.
5. Create and enter a `ResponseStatus` variable for the [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-delete-record#delete-record) property.
   * Your input property values are sent to the [delete](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3486046.html) operation.
   * The API returns the `ResponseStatus` value to your output property variable.

     ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-180876-52d9c913-6c12b036.webp)

## In the Body of the Activity

* **Object** - The object for which to delete the record. Use the **Select** button to set the object.
* **Internalid** - The **internalid** of the NetSuite record that you want to delete

## Properties

### Common

* **DisplayName** - The display name of the activity. This field supports only `Strings` or `String` variables.

### Input

* **Id** - The Id of the record that you want to delete. This field supports only `Strings` or `String` variables.

### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

### Options

* **DeletionReasonCode** - The NetSuite code that describes the reason for the deletion. This field supports only `Strings` or `String` variables.
  + The **DeletionReasonCode** value must be a deletion reason that is listed in the NetSuite application under **Setup > Accounting > Accounting Lists**.
  + If the *Use Deletion Reasons* feature is enabled and you use the **DeletionReasonCode** to identify a code that does not exist, the request fails with an *INVALID_REF_KEY* error.
* **DeletionReasonMemo** - A note describing the reason for the deletion. This field supports only `Strings` or `String` variables.

### Output

* **ResponseStatus** - The status of the request (success/failure information). Enter a `ResponseStatus` variable (*UiPath.BAF.Models.ResponseStatus*). The `ResponseStatus` object includes three properties that you can use in other activities.
  + **Success** - `Boolean` - Specifies whether the API request was successful.
  + **ErrorCode** - `String` - The response error if the API request is unsuccessful (**Success**=*False*).
  + **Message** - `String` - The error message.
