Skip to content

spec: a shared picklist (global value set) metadata kind — option lists reused across objects and packages are TypeScript constants today #18164

Description

@os-elon-musk

Path: 本地跑起来、看到 — records-forms (清单项待写, authored with #19518) | P2

Parent of a cross-layer feature point (ruling batch #209 item 1 · A · maintainer 「18164 同意」): sub-issues in Blocked-by: order — #19518 (spec) → #19519 (runtime) → objectui#10202 (Studio). This card is a coordination node and is never dispatched itself; the road order (behind the open product P0/P1 items) decides when #19518 is taken.

Gap

There is no metadata kind for an option list that several objects share. Checked on @objectstack/spec 17.4.0's dist/index.d.ts and dist/data/index.d.ts: no globalPicklist, valueSet, picklists or equivalent key. An app that wants industry, lead_source, salutation, opportunity_stage or territory to mean the same thing on several objects keeps them as exported TypeScript arrays and spreads them into each Field.select({ options: [...] }).

Evidence (hotcrm, origin/main c716a2c)

  • src/objects/_picklists.ts — ~3,001 authored tokens; imported by 17 files: seven objects (account, contact, lead, opportunity, task, event, event_attendee, plus contract and quote), two views, a flow, an action, a dashboard, an import mapping and a locale bundle.
  • Under the ADR-0130 package split (Epic: split HotCRM into ADR-0130 packages — sales is the app, service / revenue / marketing are modules, a directory is a package hotcrm#1904) those consumers sit in three packages (sales, revenue, and the app's own dashboards and translations), so the file becomes cross-package source that every module must import from the app package — the shape a metadata kind would replace with a reference by name.
  • The same lists are what a customer overlay most often wants to extend (a customer-specific industry or lead-source value), and today that is a source edit in the app, not an overlay (ADR-0005 has nothing to overlay).

Ask

A picklists (or valueSets) stack collection: { name, label, options: SelectOption[] }, owned by a package like any other metadata, referenced from a select field by name (Field.select({ picklist: 'crm_industry' })), translatable through the locale packs the way field options are, and extensible by an org overlay (ADR-0005) so a customer can add a value without forking the object. Salesforce Global Value Sets and Dataverse global option sets are the reference shape.

Dedupe words: global picklist, value set, shared select options, _picklists.ts, picklist metadata kind.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:specpm:queuepriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions