Salesforce deploy "FIELD_INTEGRITY_EXCEPTION" in CI
A field change violates an integrity rule: the new type or attribute is incompatible with existing data, a dependent picklist, or another field. Salesforce refuses the change to protect data consistency.
What this error means
The deploy fails with "FIELD_INTEGRITY_EXCEPTION" and a message about an invalid field type change, controlling field, or incompatible attribute.
Deploy failed.
Type Name Problem
CustomField Account.Tier__c FIELD_INTEGRITY_EXCEPTION: There's a problem with this field, which might be a circular reference or a field-level security issue.Common causes
An unsupported field type change
Changing a field to an incompatible type (or altering length/precision in a way data cannot satisfy) violates field integrity.
A broken dependent picklist or controlling field
A dependent picklist referencing a controlling field that does not match, or field-level security inconsistencies, trigger the exception.
How to fix it
Make the change compatible with existing data
- Read which field and attribute the error names.
- Adjust the field definition to a compatible type or split the change into safe steps.
- Ensure dependent picklist controlling-field mappings are valid.
Deploy controlling and dependent fields together
When a dependent picklist is involved, deploy the controlling field and its valueSettings in the same set so the relationship is consistent.
sf project deploy start --target-org ci-org \
--source-dir force-app/main/default/objectsHow to prevent it
- Avoid incompatible field type changes; add a new field and migrate instead.
- Deploy controlling and dependent picklist metadata together.
- Validate field changes against an org with representative data.