> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NetSuite Functions

## Create NetSuite Record

**Function name:** `CreateNetsuiteRecordFunction`
**Category:** Write
**Destination:** NetSuite

Creates a record in NetSuite

### Parameters

| Name                          | Label                          | Required | Description                                                                |
| ----------------------------- | ------------------------------ | :------: | -------------------------------------------------------------------------- |
| `integrationCredentialsId`    | Credentials                    |    Yes   | NetSuite credentials to use.                                               |
| `recordType`                  | Record type                    |    Yes   | The type of NetSuite record to create                                      |
| `inputData`                   | Input data                     |    Yes   | The name of the variable containing the record data to be sent to NetSuite |
| `stateVariable`               | Output data                    |    No    | The name of the variable to store the response from NetSuite               |
| `parentRecordPathCalculation` | Parent record path calculation |    No    | Calculation that evaluates to the path to a parent record                  |

### Exits

| Exit    | Description |
| ------- | ----------- |
| `NEXT`  | -           |
| `ERROR` | -           |

## Delete NetSuite Record

**Function name:** `DeleteNetsuiteRecordFunction`
**Category:** Write
**Destination:** NetSuite

Deletes a record in NetSuite

### Parameters

| Name                          | Label                          | Required | Description                                                        |
| ----------------------------- | ------------------------------ | :------: | ------------------------------------------------------------------ |
| `integrationCredentialsId`    | Credentials                    |    Yes   | NetSuite credentials to use.                                       |
| `recordType`                  | Record type                    |    Yes   | The type of NetSuite record to delete                              |
| `recordId`                    | Record id                      |    Yes   | The name of the variable containing the ID of the record to delete |
| `parentRecordPathCalculation` | Parent record path calculation |    No    | Calculation that evaluates to the path to a parent record          |

### Exits

| Exit    | Description |
| ------- | ----------- |
| `NEXT`  | -           |
| `ERROR` | -           |

## List NetSuite Records

**Function name:** `ListNetsuiteRecordsFunction`
**Category:** Read
**Destination:** NetSuite

List records in NetSuite

### Parameters

| Name                          | Label                          | Required | Description                                                                |
| ----------------------------- | ------------------------------ | :------: | -------------------------------------------------------------------------- |
| `integrationCredentialsId`    | Credentials                    |    Yes   | NetSuite credentials to use.                                               |
| `recordType`                  | Record type                    |    Yes   | The type of NetSuite record to read                                        |
| `query`                       | Query                          |    Yes   | The name of the variable containing the query to be executed               |
| `stateVariable`               | Output results name            |    Yes   | Name of the variable by which the objects iterator will be stored in state |
| `parentRecordPathCalculation` | Parent record path calculation |    No    | Calculation that evaluates to the path to a parent record                  |

### Exits

| Exit    | Description |
| ------- | ----------- |
| `NEXT`  | -           |
| `ERROR` | -           |

## Query NetSuite Record

**Function name:** `QueryNetsuiteSingleRecordFunction`
**Category:** Read
**Destination:** NetSuite

Retrieve a single Netsuite record using SuiteQL. If more than one record is returned by the query, the workflow will fail.

### Parameters

| Name                          | Label                          | Required | Description                                                      |
| ----------------------------- | ------------------------------ | :------: | ---------------------------------------------------------------- |
| `integrationCredentialsId`    | Credentials                    |    Yes   | NetSuite credentials to use.                                     |
| `query`                       | Query                          |    Yes   | The SuiteQL query to be executed                                 |
| `stateVariable`               | Output results name            |    Yes   | Name of the variable by which the record will be stored in state |
| `parentRecordPathCalculation` | Parent record path calculation |    No    | Calculation that evaluates to the path to a parent record        |

### Exits

| Exit    | Description |
| ------- | ----------- |
| `NEXT`  | -           |
| `ERROR` | -           |

## Read NetSuite Record

**Function name:** `ReadNetsuiteRecordFunction`
**Category:** Read
**Destination:** NetSuite

Read a record from NetSuite

### Parameters

| Name                          | Label                          | Required | Description                                                      |
| ----------------------------- | ------------------------------ | :------: | ---------------------------------------------------------------- |
| `integrationCredentialsId`    | Credentials                    |    Yes   | NetSuite credentials to use.                                     |
| `recordType`                  | Record type                    |    Yes   | The type of NetSuite record to read                              |
| `recordId`                    | Record id                      |    Yes   | The name of the variable containing the ID of the record to read |
| `stateVariable`               | Output data                    |    No    | The name of the variable to store the response from NetSuite     |
| `parentRecordPathCalculation` | Parent record path calculation |    No    | Calculation that evaluates to the path to a parent record        |

### Exits

| Exit    | Description |
| ------- | ----------- |
| `NEXT`  | -           |
| `ERROR` | -           |

## Update NetSuite Record

**Function name:** `UpdateNetsuiteRecordFunction`
**Category:** Write
**Destination:** NetSuite

Updates a record in NetSuite

### Parameters

| Name                          | Label                          | Required | Description                                                                                                                                                                                                                                                                                        |
| ----------------------------- | ------------------------------ | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `integrationCredentialsId`    | Credentials                    |    Yes   | NetSuite credentials to use.                                                                                                                                                                                                                                                                       |
| `recordType`                  | Record type                    |    Yes   | The type of NetSuite record to create                                                                                                                                                                                                                                                              |
| `recordId`                    | Record id variable             |    Yes   | The name of the variable containing the ID of the existing record in NetSuite that should be updated                                                                                                                                                                                               |
| `replace`                     | Replace                        |    No    | The names of sublists on this record. All sublist lines will be replaced with lines specified in the request. The names are delimited by comma. If this is not specified, the sublist lines will be appended to the existing lines. In order to update top level fields do not set this parameter. |
| `inputData`                   | Input data variable            |    Yes   | The name of the variable containing the record data to be sent to NetSuite                                                                                                                                                                                                                         |
| `stateVariable`               | Output data variable           |    No    | The name of the variable to store the response from NetSuite                                                                                                                                                                                                                                       |
| `parentRecordPathCalculation` | Parent record path calculation |    No    | Calculation that evaluates to the path to a parent record                                                                                                                                                                                                                                          |

### Exits

| Exit    | Description |
| ------- | ----------- |
| `NEXT`  | -           |
| `ERROR` | -           |
