#5450·vendure

Dashboard country detail page does not show or save Region custom fields

Author: ivanvasyliukCreated Sep 30, 2026Updated Sep 30, 2026

Describe the bug

Custom fields for a country are configured under Region. In the dashboard, the country detail page neither shows these custom fields nor saves them.

The detail query already treats Country as an alias of Region when it adds the custom fields selection (packages/dashboard/src/lib/framework/document-introspection/add-custom-fields.ts), so the values are loaded. useCustomFieldConfig (packages/dashboard/src/lib/hooks/use-custom-field-config.ts) has no such alias: it looks up entityCustomFields by the literal name Country and finds nothing.

That one lookup feeds CustomFieldsPageBlock, CustomFieldsForm and useDetailPage, which gives two symptoms:

  • CustomFieldsPageBlock entityType="Country" gets an empty config and renders nothing.
  • useDetailPage passes the same empty config to removeReadonlyAndLocalizedCustomFields, so every custom field is dropped from the update input.

To Reproduce

  1. Add a custom field to Region (see the configuration below).
  2. Open the dashboard, go to Settings → Countries and open any country.
  3. There is no custom fields block on the page.
  4. Change the country name and save. The updateCountry input contains customFields: {}.

Expected behavior

The country detail page shows the custom fields configured for Region, and saving the page sends their values.

Actual behavior

No custom fields are shown. A value set through the Admin API cannot be seen or edited in the dashboard. The save succeeds and reports success, with an empty customFields object.

Environment (please complete the following information):

  • @vendure/core version: 3.7.3 (@vendure/dashboard 3.7.3); the code is unchanged on master
  • Nodejs version: 22.21.1
  • Database (mysql/postgres etc): postgres
  • Operating System (Windows/macOS/Linux): macOS
  • Browser (if applicable): Chromium
  • Package manager (npm/yarn/pnpm): npm

Configuration

typescript
customFields: {
    Region: [{ name: 'regionCode', type: 'string', nullable: true }],
},

Workaround

Patch useCustomFieldConfig so that Country resolves to Region:

typescript
const entityName = entityType === 'Country' ? 'Region' : entityType;
const customFieldConfig = serverConfig.entityCustomFields.find(field => field.entityName === entityName);

Additional context

It happens consistently. #5449 applies the alias above and adds a spec for it.