A NetSuite import that creates a record from another transaction, such as an invoice from a sales order or an item receipt from a purchase order, fails with invalid_initialize_ref when NetSuite won't create the new record from that source transaction in its current state. This article explains what the error means, how to find the cause from the source transaction's status, and how to resolve each cause. It applies to any flow that imports into NetSuite, including templates and integration apps.
What the error means
Symptom: A NetSuite import fails with this error:
Failed to create, update/transform record because You can not initialize <record type>: invalid reference <id>
For an item fulfillment or a cash sale created from a sales order, the message reads You have an invalid sales order <id> or the order is already closed.
The import creates the new record from a source transaction. The mapping's Created From value holds the internal ID of that source transaction, and that's the ID in the message. The source transaction exists, but NetSuite won't create this record from it in its current state. To find the cause, open the source transaction in NetSuite and check its status against the sections below.
The source transaction is already fully processed
Symptom: The source transaction has one of these statuses:
| Record the import creates | Source transaction | Status |
|---|---|---|
| Item receipt | Purchase order | Pending Bill, Fully Billed, or Closed |
| Item receipt | Transfer order | Received |
| Item receipt | Return authorization | Pending Refund, Refunded, or Closed |
| Item fulfillment | Sales order | Pending Billing, Billed, or Closed |
| Invoice | Sales order | Billed or Closed |
Cause: Nothing is left on the source transaction to receive, fulfill, or bill. The record usually already exists, for example because the same request was sent again.
Resolution:
- In NetSuite, find the record that was already created from the source transaction, and compare it with the failed record.
- If the existing record is correct, resolve the error in integrator.io. Retrying the error fails the same way.
The source transaction isn't approved or ready
Symptom: The source transaction has one of these statuses:
| Record the import creates | Source transaction | Status |
|---|---|---|
| Item receipt | Purchase order | Pending Supervisor Approval or Rejected |
| Item receipt | Transfer order | Pending Approval or Pending Fulfillment |
| Item receipt | Return authorization | Pending Approval |
| Item fulfillment | Sales order | Pending Approval |
| Invoice | Sales order | Pending Approval or Pending Fulfillment |
Cause: The source transaction must be approved first, or an earlier step, such as fulfilling or shipping it, hasn't happened yet.
Resolution:
- In NetSuite, approve the source transaction, or complete the earlier step, such as fulfilling or shipping it.
- Retry the error in integrator.io.
The purchase order is a drop shipment
Symptom: An item receipt created from a purchase order fails, even though the purchase order's status is Pending Receipt.
Cause: The purchase order's lines are drop-shipped. NetSuite doesn't create item receipts from drop-ship purchase orders.
Resolution: Resolve the error in integrator.io. Don't send an item receipt for this purchase order. Retrying the error doesn't help.
Errors that look similar
These errors also appear when a NetSuite import creates a record from another transaction, but they have different causes:
That type of record transformation is not allowed: NetSuite doesn't create the record type the import sends from this type of source transaction.Invalid transaction # <id>: No transaction in NetSuite has the internal ID the import sent.