Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
All errors
Validation

FIELD_CUSTOM_VALIDATION_EXCEPTION: <your validation rule's error message>

A validation rule on the object evaluated to TRUE for the record being saved, blocking the save. The text after the colon is the rule's own error message — it's the message your admin wrote for end users.

Also seen asFIELD_CUSTOM_VALIDATION_EXCEPTION·FIELD_CUSTOM_VALIDATION·validation rule error

This isn't a system error. It's the platform telling you that a configured validation rule rejected your save, and reading you the rule's custom error message. The "fix" is almost always one of: change the data so the rule passes, change the rule, or bypass the rule for the integration that triggered this.

Find the rule

The error message includes the rule's error message text. Use that to find the rule:

  1. Setup → Object Manager → your object → Validation Rules
  2. ctrl-F for a unique fragment of the error text
  3. Open the rule and read its formula

Sometimes the rule text is auto-generated like "Error: Invalid Data" and matches several rules. In that case, look at which fields are flagged on the page (the API also returns DmlFieldNames, which point at the fields the rule says are bad).

Bypass for system integrations

Validation rules apply to API integrations the same as to UI users. If your integration legitimately needs to skip a rule (data migration, system-of-record sync), the standard bypass pattern is a custom permission:

  1. Create a custom permission Bypass_Validation_X.
  2. Edit the rule's formula to short-circuit when the running user has the permission:
    AND(
      ISBLANK(SLA_Start_Date__c),
      NOT($Permission.Bypass_Validation_X)
    )
    
  3. Assign the permission to the integration user via a permission set.

Now the integration is exempt; the UI users still hit the rule.

Bypass for Apex tests

A flaky test that works in one sandbox and fails in another is sometimes hitting a rule that depends on org configuration. The same custom-permission trick works in tests:

@isTest static void doesItSave() {
    User svc = [SELECT Id FROM User WHERE Profile.Name = 'Integration' LIMIT 1];
    System.runAs(svc) {
        // the bypass permission is on this user; the rule passes
        insert new Account(Name = 'Test');
    }
}

When the rule references a related-object field

Account.Owner.Custom_Field__c only works in a validation rule if the relationship is direct (lookup or master-detail). If your rule references something via a formula field that itself references another object, the platform may not be able to evaluate it for some save contexts (specifically, partial reparenting). Fix: precompute the result into a field on the same object using a roll-up or formula, then validate against that field directly.

Related dictionary terms