ERD Builder is a ServiceNow Service Portal application that enables administrators to quickly generate Entity Relationship Diagrams (ERDs) directly from platform metadata. It provides an intuitive, visual way to explore table structures, relationships, and inheritance without exporting data or relying on external tools.
Designed for architects, developers, and platform administrators, ERD Builder helps teams understand and document their ServiceNow data model with speed and confidence.
-
Dynamic Table Discovery
Search and select ServiceNow tables by name or label using platform metadata. -
Automatic ER Diagram Generation
Instantly generate ERDs based on dictionary definitions, including:- Table attributes (columns)
- Primary and foreign keys
- Reference relationships
- Table inheritance (extends)
-
Configurable Diagram Detail
Choose between detailed column-level diagrams or compact table-only views. Control the maximum number of attributes rendered per table to manage complexity. -
Interactive Diagram Viewer
Explore large diagrams with built-in zoom, pan, reset, and fullscreen controls for improved readability. -
Export & Share
- Download diagrams as SVG files for documentation and presentations
- Copy Mermaid ERD source for reuse in wikis, repositories, or design artifacts
-
Access-Aware & Safe by Design
The application respects ServiceNow ACLs and uses secure metadata access. When access is restricted, ERD Builder degrades gracefully and provides clear warnings.
- Admin-only usage to prevent unintended exposure
- Read-only metadata access — no business or transactional data is queried or modified
- No new tables or schema changes introduced
- Scoped application suitable for Store publication
- Understanding complex table relationships in existing instances
- Documenting customizations and data models
- Accelerating onboarding for new developers and architects
- Supporting design reviews, audits, and technical documentation
ERD Builder is a custom ServiceNow Service Portal widget that allows administrators to generate Entity Relationship Diagrams (ERDs) for ServiceNow tables. The widget dynamically builds diagrams using Mermaid ERD syntax, renders them client-side, and supports interactive exploration through zooming, panning, fullscreen mode, and export capabilities.
The widget is scoped, protected, and restricted to users with the admin role.
Key Features1. Table Search and Selection- Live search of tables using sys_db_object, filtering by table name and label.
- Supports partial matches and label-based searching.
- Displays search results in a selectable list with checkboxes.
- Allows bulk actions:
- Select all
- Clear selection
- Selected tables are shown as removable “pill” tokens.
Access fallback behavior
- If the user lacks read access to sys_db_object, the widget can fall back to an allow-list (allowed_tables_csv option).
- Displays a warning when metadata access is restricted.
- Generates ER diagrams using Mermaid ER diagram syntax (erDiagram).
- Server-side script dynamically builds Mermaid definitions based on:
- Selected tables
- Dictionary metadata (sys_dictionary)
- Reference relationships
- Table inheritance (super_class)
Diagram detail modes
- Columns: Displays attributes with data types, primary keys (PK), and foreign keys (FK).
- Compact: Displays table names only, without attributes.
Attribute handling
- Primary keys are inferred from sys_id.
- Foreign keys are inferred from dictionary references.
- Column types are normalized (e.g., int, float, date, string).
- Reference relationships are rendered as:Parent ||--o{ Child : field_name
- Supports:
- Inbound references to selected tables
- Optional inclusion of neighbor tables
- Relationships are derived from sys_dictionary.reference.
- Optional visualization of table inheritance using extends relationships.
- Parent/child inheritance is read from sys_db_object.super_class.
- Rendered as:Parent ||--|| Child : extends
- Client-side rendering via Mermaid.js (loaded dynamically from CDN).
- SVG-based diagram with:
- Zoom in / zoom out
- Reset zoom
- Pan support
- Uses svg-pan-zoom for interaction.
- Automatic resizing on window resize and fullscreen toggle.
- Diagram container can be toggled into fullscreen.
- Automatically recalculates SVG dimensions when entering or exiting fullscreen.
- Improves usability for large or complex ERDs.
- Download SVG: Exports the rendered ERD as an SVG file (erd.svg).
- Copy Mermaid Source: Copies the generated Mermaid definition to the clipboard for reuse outside ServiceNow.
- Displays confirmation messages when actions succeed.
- Configurable maximum column count per table (maxCols, default up to 500).
- Character limit enforced via system property:x_upse_erd.erd_char_limit
- Diagrams exceeding the limit are truncated with a warning message.
Initial Release – ERD Builder Widget
Created: 2026‑02‑11
Last Updated: 2026‑02‑12
Scope: ERD (x_upse_erd)
Widget ID: x_upse_erd
Included in this release
- Interactive Service Portal widget for ERD generation
- Dynamic table search with metadata-aware fallback behavior
- Mermaid-based ER diagram generation
- Support for:
- Table attributes
- Reference relationships
- Table inheritance
- Zoom, pan, reset, and fullscreen diagram controls
- SVG export and Mermaid source copy
- Graceful degradation when dictionary or table metadata access is restricted
- Diagram size and complexity safeguards
- Admin-only access control
No earlier versions or incremental change history are present in the update set metadata; this release represents the baseline implementation of the widget.
Standalone product no other modules required