Skip to main content

SF-0090 · Scenario · Medium

Can we run validation rules only for new records and not while updating the records?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026 · Updated for Spring '26

Yes — Salesforce gives you the ISNEW() function specifically for this. Wrap your rule condition in AND(ISNEW(), ...) and the rule only fires on insert, never on subsequent updates.

The function

FunctionReturns
ISNEW()TRUE if the record is being created (during the insert event), FALSE if it’s an update
ISCHANGED(field)TRUE if the field value changed since the previous save — works on update only
PRIORVALUE(field)The value the field had before this save attempt

Example: require Industry on new Accounts only

You want to demand an Industry value when a rep creates an Account, but you don’t want to break edits to thousands of existing records that were imported without one.

AND(
  ISNEW(),
  ISBLANK(Industry)
)
  • New Account, no Industry → save fails
  • Existing Account, no Industry → save succeeds
  • Existing Account, edit Industry → save succeeds

A common variant: insert OR field change

Often the requirement is “validate on insert, and also on any update that touches this field.” That’s:

AND(
  ISBLANK(Industry),
  OR(ISNEW(), ISCHANGED(Industry))
)

The rule fires when:

  • Inserting a record with no Industry, or
  • Updating a record and blanking out Industry

But not when editing other fields on a record that already had a blank Industry.

Don’t confuse ISNEW() with ISCHANGED()

ScenarioISNEW()ISCHANGED(Industry)
Inserting a brand-new recordTRUEFALSE (always false on insert — there’s no prior value)
Updating an existing record, Industry changedFALSETRUE
Updating an existing record, Industry unchangedFALSEFALSE

ISCHANGED() is FALSE on insert — this catches many candidates off-guard.

What interviewers want

  • Yes, with the function name ISNEW()
  • Bonus: show the OR(ISNEW(), ISCHANGED(field)) pattern for the common “insert or relevant edit” case
  • Awareness that ISCHANGED() returns FALSE on insert — a frequent follow-up trap

Verified against: Salesforce Help — ISNEW and ISCHANGED. Last reviewed 2026-05-17 for Spring ‘26 release.