Skip to main content
A record code is the readable identifier DualEntry gives a record, such as IN-0042 or ACME-JE-0007. It appears in the Record code column of record lists, in the record’s page header and breadcrumb, and in the public API and MCP server. The Record Numbering tab of Organization Settings controls how codes are built. This page lists every setting, the default prefix for each record type, and the rules for when codes are assigned. For the setup steps, see How to Set Up Record Numbering.

Record Numbering tab settings

The Record Numbering tab has one organization-wide toggle, a list of company prefixes, and a table with one row per record type. Only users with the Administrator role can edit it. Settings on the Record Numbering tab: Padding and Starting Value can be set only when a row starts a new sequence, which happens when you change its Record Prefix or its Company Prefix switch. Each record type has one active sequence at a time.

Default record prefixes

Every record type that receives a code has a default prefix. A new organization starts with one shared sequence per record type in the format PREFIX-{number}, with no leading zeros and a first number of 1, so the first invoice is IN-1. Default prefix for each record type, as listed in the Transaction Type column: Invoices generated from a revenue contract use the Contract Invoice sequence; all other invoices use the Invoice sequence. Inventory fulfillments, receipts, transfers, and adjustments, and items, don’t receive record codes.

When a record gets its code

DualEntry assigns a record code when a record posts, not when it’s saved. The rules below apply to every record type in the default prefix table.
  • Posting: A record takes the next number in its sequence at the moment it posts, including when it posts after approval in an approval workflow. A record waiting for approval has no code yet.
  • Drafts: A draft shows a placeholder in the format DRAFT-{prefix}-{record ID}, such as DRAFT-IN-935, and doesn’t use a number from the sequence. The placeholder is replaced by a real code when the draft posts.
  • Customers and vendors: Customers and vendors are never drafted or posted, so they get their code when they’re created.
  • Failed posts: The number is reserved in the same database transaction that posts the record. If the post fails or is rolled back, the number is not used up.
  • Permanence: Once a record has a code, the code never changes. Changing a prefix, the pattern, padding, or the Number records uniquely by company toggle affects only records that get their code afterward.
  • Per-company sequences: When a record type uses per-company sequences, each company counts separately, so two companies can each have a record numbered 0001 behind different company prefixes.

Records created before record codes and by migration

Records that existed before record codes were turned on, and records brought in by a migration import, get codes in fixed formats rather than from a sequence. These codes are permanent. Code formats DualEntry assigns outside the normal sequence: When record codes are turned on for an organization that already has records, each record type’s sequence starts one above the highest existing record ID of that type. New codes therefore continue after the codes of existing records and never repeat one of them.

Known limits

These limits apply to record codes on every record type:
  • No yearly or monthly reset: Record numbers keep counting up. A sequence doesn’t restart at a new fiscal year, calendar year, or month, and a code can’t include the date.
  • Increment of one: Each new record takes the next whole number. The Record Numbering tab has no setting to count by more than one.
  • Company prefix required for per-company codes: If a record type uses per-company sequences and the record’s company has no prefix, the post fails with Company abbreviation is required when pattern includes {company}. Set the company’s prefix and post again.
  • Customers and vendors share one sequence: Customer and vendor codes can’t use per-company sequences.
  • Reserved prefixes: A code can’t start with MIGR or DRAFT, because DualEntry uses those prefixes for migration codes and draft placeholders.
  • No renumbering: DualEntry doesn’t renumber existing records. A change to the pattern or a prefix applies only to records that get their code afterward.

Record codes in the API and MCP server

Record codes are available outside the app wherever records are read or searched.
  • Public API: Records such as invoices, bills, and journal entries return the code in the code field, a string that is null when the record has no code and that holds the placeholder for drafts. List endpoints for these records accept a code filter with one or more codes. See the API reference.
  • MCP server: The search_records tool takes a code argument, and get_record_by_number accepts a record code such as JE-0042. Paste a code from the app into a prompt and the assistant can find the record. See the MCP integration page.
  • CLI: The DualEntry CLI doesn’t show record codes in its output.
Last modified on November 3, 2026