NetSuite icon

NetSuite

NetSuite REST API

Overview

This node integrates with the NetSuite REST API to perform various record management operations. Specifically, the "Remove Record" operation deletes a specified record from NetSuite based on its type and internal identifier. This is useful in automation workflows where obsolete or incorrect records need to be programmatically removed without manual intervention.

Common scenarios include:

  • Automatically deleting outdated sales orders or invoices.
  • Removing test or temporary customer records after processing.
  • Cleaning up custom records or subsidiary relationships as part of data maintenance.

Example: A workflow that triggers when a customer cancels an order could use this node to remove the corresponding sales order record from NetSuite automatically.

Properties

Name Meaning
Record Type The type of NetSuite record to delete. 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 if Record Type is "Custom Record (*)") The internal script ID of the custom record type to target for deletion. These IDs typically start with "customrecord".
ID The internal identifier of the specific record to delete. Can be prefixed with eid: to indicate an external identifier instead of an internal one.
API Version The version of the NetSuite REST API to use. Currently only "v1" is supported.
Options Additional options for the request:
- Concurrency: Maximum number of concurrent REST requests sent to NetSuite (default 1).
- Full Response: If true, 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 success flag set to true.
  • 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 output on success:

{
  "success": true,
  "id": "12345",
  "links": [
    {
      "rel": "self",
      "href": "/services/rest/record/v1/salesOrder/12345"
    }
  ]
}

Example output on error:

{
  "error": "Record not found"
}

Dependencies

  • Requires valid NetSuite API credentials including account ID, consumer key/secret, and token key/secret.
  • Uses the NetSuite REST API v1 endpoint.
  • The node respects concurrency limits to avoid overwhelming the NetSuite API.
  • No additional environment variables are required beyond the configured credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing record ID: Ensure the internal ID or external ID prefix is correct.
    • Insufficient permissions: The API credentials must have delete access for the specified record type.
    • Network or authentication errors: Verify API keys and network connectivity.
    • Using "Custom Record" without specifying the script ID will cause errors.
  • Error messages:

    • "Record not found": The specified record ID does not exist; verify the ID.
    • "Unauthorized" or "Forbidden": Check API credentials and permissions.
    • "The operation \"removeRecord\" is not supported!": Indicates an unsupported operation was requested; ensure the operation parameter is correctly set.
  • To handle errors gracefully, enable "Continue On Fail" in the node settings to prevent workflow interruption.

Links and References

Discussion