Prevent deletion/modification of necessary fields

Created on 15 August 2025, 18 days ago

Problem/Motivation

There are a bunch of fields that are required for the system to function. Let's call them "critical fields".

Locking them makes it difficult for a site builder to customize their CRM, but we should still offer some protection.

Steps to reproduce

One example:

  1. Delete the "Preferred name" field from the Person Contact Type
  2. Submit a Person add/edit form

Expected: Form submits successfully
Actual: White screen error

Proposed resolution

Prevent deletion of critical fields via the UI while allowing some configuration to be changed

Remaining tasks

  • Identify critical fields
  • Decide how we'll prevent/discourage deletion or changing of critical configuration
  • Implement

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jdleonard Austin, TX, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jdleonard
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    I think we should handle the removal of these fields elegantly. I think site builders should be granted as much freedom as possible.

    The project really only needs the base field name to work. Full Name, Aliases, and Preferred name are only used for the User's Display name, and the entity name field.

    If we set `persist_with_no_fields: true` site builders can delete the field and still re-add it later.

  • πŸ‡ΊπŸ‡ΈUnited States jdleonard Austin, TX, USA

    I agree.

    I'm new to `persist_with_no_fields`. Would it cause artifacts to remain after uninstalling CRM?

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    It means the field is available to add to a contact even if it is deleted from the person bundle.

Production build 0.71.5 2024