Overview
This node integrates with the NetSuite REST API to manage various types of records within a NetSuite account. Specifically, the Remove Record operation allows users to delete a record of a specified type by its internal or external identifier.
Common scenarios where this node is beneficial include:
- Automating cleanup of obsolete or test data in NetSuite.
- Integrating external systems that require removing records from NetSuite as part of their workflow.
- Managing lifecycle of business entities such as customers, sales orders, invoices, etc., by programmatically deleting them when no longer needed.
For example, a user might configure this node to remove a "Sales Order" record by providing its internal ID, helping maintain accurate and up-to-date order data without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Record Type | The type of NetSuite record to remove. Options include many standard record types such as Assembly Item, Billing Account, Calendar Event, Cash Sale, Contact, Customer, Invoice, Sales Order, Vendor, and more. For custom records, select "Custom Record (*)". |
| Custom Record Script ID | Required only if "Custom Record (*)" is selected as the Record Type. This is the internal script ID of the custom record type, typically starting with customrecord. |
| ID | The internal identifier of the record to remove. Can be prefixed with eid: to specify an external identifier instead of the internal one. |
| API Version | The version of the NetSuite REST API to use. Currently supports "v1". |
| Options | Additional options for the request: • Concurrency: Maximum number of concurrent REST requests sent to NetSuite (default is 1). • Full Response: If enabled, returns the full HTTP response instead of just the body. |
Output
The output JSON contains the result of the delete operation:
- On success (HTTP status 204), the output includes a
successflag set totrue. - It may also include metadata such as property validation errors, operation ID, job ID, and links related to the deleted record.
- On failure, the output contains an error message describing the issue.
No binary data is produced by this operation.
Example successful output snippet:
{
"success": true,
"id": "12345",
"links": [
{
"rel": "self",
"href": "https://.../services/rest/record/v1/salesOrder/12345"
}
]
}
Dependencies
- Requires valid NetSuite credentials with appropriate permissions to delete records via the REST API.
- The node uses the NetSuite REST API endpoint
services/rest/record/{version}/{recordType}/{internalId}with the DELETE method. - Supports concurrency control to limit simultaneous API calls.
- Requires n8n environment configured with the necessary API authentication tokens or keys for NetSuite.
Troubleshooting
Error: "The operation 'removeRecord' is not supported!"
Occurs if the operation parameter is incorrectly set or unsupported. Ensure the operation is exactly "removeRecord".Authentication Errors
If the node fails due to authentication issues, verify that the API credentials are correct and have sufficient permissions.Record Not Found or Invalid ID
If the specified internal ID does not exist or is invalid, the API will return an error. Double-check the ID and prefix usage (eid:for external IDs).Concurrency Issues
Setting concurrency too high may lead to rate limiting or throttling by NetSuite. Adjust the concurrency option accordingly.Full Response Option
Enabling "Full Response" can help debug issues by providing HTTP status codes and headers along with the response body.