# Attach File

> `UiPath.OracleNetSuite.Activities.AttachFile`

`UiPath.OracleNetSuite.Activities.AttachFile`

The **Attach File** activity uses the the Oracle NetSuite [attach / detach](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3481947.html) API to attach an already uploaded file (**FileId**) to a specific object (**Object**).

The activity returns the status of the attach method (success/failure information) in a `ResponseStatus` object (**ResponseStatus**). This can be used as an input variable in subsequent activities (e.g., **ResponseStatus** in conditional logic).

## How it works

The following steps are 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 **Attach File** activity inside the **Oracle NetSuite Application Scope** activity.
4. Click the Select button and choose a `NetSuite Object` from the design time Drop Down List [Input](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-attach-file#attach-file) properties.
5. Create and enter a `String` and a `ObjectId` variable for the [Input](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-attach-file#attach-file) properties.
6. Create and enter a `String` and a `FileId` variable for the [Input](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-attach-file#attach-file) properties.
7. Create and enter a `String` and a `ResponseStatus` variable for the [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/oracle-netsuite-attach-file#attach-file) properties.

## In the Body of the Activity

* **NetSuite Object** - Id of the file you wish to attach. Select an object type from the Drop Down List.
* **ObjectId** - The Id of the object you wish to attach a file to. This field supports only `Strings` or `String` variables.
* **FileId** - Id of the file you wish to attach. This field supports only `Strings` or `String` variables.

## Properties

### Common

* **DisplayName** - The display name of the activity. 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.

### 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.
