Skip to Content
NSUI

Timeline

A record's change history as a small git-style graph.

Use a timeline to show who changed what on a record or a line, and when. Saved changes sit on one line, newest first: the current entry is filled, older ones are hollow. Unsaved edits branch off the current entry in amber.

Entries

Each entry is { id, who, at, current, diffs }.

  • at is an ISO date-time. The element formats it with locale: a day header ("Today · Dec 3, 2026", "Yesterday · Dec 2, 2026", else "Dec 1, 2026") and a time ("3:47 PM"). Entries group by local day.
  • current marks the entry that matches the saved record. Set it on one entry at most.
  • diffs is { field, from, to }[]. Leave from empty for a field that was set, and to empty for a field that was cleared.

pending is { who, diffs }. Its line reads "2 edits on top of BL-95 · you".

Build entries from system notes (a systemnote search) or your own audit records. The element has no NetSuite binding.

Older changes

limit (default 10) sets how many entries show. A "Show N older changes" button reveals the rest of entries, and focus moves to the first newly shown entry. limit="0" shows all.

When the server has more history than entries holds, set more. A "Load older changes" button then shows after the last entry and fires timelinemore. Append the older entries to entries, and clear more when there are none left.

JavaScript
history.addEventListener('timelinemore', async () => {
  const older = await fetchOlder(history.entries.at(-1).id);
  history.entries = [...history.entries, ...older];
  history.more = older.length > 0;
});

Empty

With no entries and nothing pending, the timeline shows a history icon and empty-text ("No changes yet." by default).

Accessibility

  • The list is an <ol>, so screen readers announce the count and order. Day headers are level 4 headings.
  • Each change reads in words: "Quantity changed from 55 to 65". The − and + glyphs, the colours and the graph are hidden from screen readers.
  • "Current" and "Unsaved" are real text, so colour is never the only cue.
  • All values show as text. HTML in a field is not rendered.

API

Attributes

Prop

Type

Properties

Prop

Type

Events

Prop

Type

CSS parts

Prop

Type

NSUI is a community project. It is not an official Oracle NetSuite product. NetSuite is a trademark of Oracle.

On this page