The quick version: a schema change in a live org is safe when you have found everything that references the thing you are changing, and unsafe when you have not. Setup’s own dependency tools find most of it and miss the categories that hurt: dynamic Apex, hardcoded strings, middleware mappings, external reports. Work through a checklist, deploy from a sandbox, and check field-level security afterwards because that is the step everybody skips.
Before: find the references
Start with the platform’s own answer. Every custom field has a “Where is this used?” view listing the metadata referencing it, and it is good at formulas, validation rules, layouts, reports and flows.
Then find what it misses. The categories, roughly in order of how often they bite:
- Dynamic SOQL and field names built as strings in Apex. Nothing indexes those. Grep the source.
- Integrations. Middleware field mappings, any external tool with a saved query, ETL jobs, a marketing platform’s sync configuration. These live outside the org and nobody in Setup knows about them.
- Private reports and list views, which belong to their owner and do not turn up in a dependency check.
- Analytics datasets and BI tools pulling the field on a schedule.
- Email templates and document templates using merge fields.
Before: decide what is irreversible
Some decisions cannot be undone in a package or in practice, so make them consciously.
- The API name. Change it and every formula, integration and piece of code using the old one breaks with no automatic fixup.
- The field type. Some conversions are lossy, some are blocked once data exists, and the wizard tells you which only after you have committed to the path.
- Lookup to master-detail, and back. Possible under conditions, painful, and it changes sharing and deletion behaviour.
- Reducing decimal places, shortening a text field, restricting a picklist. Each rounds, truncates or rejects existing data.
Before: check the data
Adding a field is free. Constraining one is not.
Making a field required, adding a validation rule or turning on uniqueness affects records only on their next save, so nothing breaks immediately. It breaks weeks later, when a user edits an old record and gets an error about a field they did not touch. Report first on the records that violate the new rule, then decide: fix them, exempt them, or accept the tickets.
On very large objects, adding a required field or a unique index takes real time. Schedule accordingly.
Before: the deployment itself
- Build and test in a sandbox with representative data, not an empty developer org.
- Include field-level security in the deployment, or have the permission set updates ready to run straight after.
- Check the layouts. A new field that is not on a layout is invisible, and half of “the deployment failed” reports are really this.
- Know which Apex tests will run and whether they pass in production today, rather than finding out during the deployment window.
- Tell the people who will notice. A finance team meeting a renamed field mid close is avoidable.
After: verify in this order
- Field-level security. Open the field, check the profiles and permission sets. New fields default to hidden for everyone except administrators, which is why the admin sees it working and nobody else does.
- Layouts and Lightning pages. Check a record by logging in as a real user.
- The reports people run. Pick the three that matter and open them.
- Automation errors. Flow and Apex exception emails go to the address configured in Setup. Watch that inbox for a day, not an hour.
- Integration logs, on the external side, because a failing sync often retries quietly rather than alerting.
- Validation rule fallout. A spike in save errors shows up as user complaints first and in debug logs second.
Deleting a field
Deletion is a two-stage process, deliberately. A deleted custom field sits in a recoverable list in Setup with its data intact for a limited period, then is erased permanently. Until it is erased you cannot create a new field with the same API name, which trips up anyone rebuilding a field with a corrected type.
The safe sequence: remove it from layouts, wait a release cycle, then delete.
Frequently asked
Can I rename a field safely? The label, yes. The API name, no, and there is no rename that updates references for you.
Should schema changes go through a release process? Yes, including the trivial-looking ones. A picklist value added straight into production is the change nobody can find six months later when the sandbox behaves differently.
How do I know whether a field is used at all? Report on how many records have it populated and check the dependency view. A field empty on every record and referenced by nothing is the easy case, and it is rarer than you would hope.