Loading

Formula: Return TRUE When a Record Is Created or a Specific Field Changes Using ISNEW and ISCHANGED

Date de publication: Dec 8, 2025
Description

This article covers how to use the ISNEW and ISCHANGED functions in a Salesforce formula to return TRUE when a record is created or when a specific field changes. Use this logic in places such as validation rules.

Résolution

This article explains how to write a formula that returns TRUE when a record is either newly created or a specific field has changed, using the ISNEW and ISCHANGED functions.

The Formula

To determine if a record is newly created or if a specific field has changed, use the ISNEW and ISCHANGED functions. To return TRUE when "a record is created" OR "a specific field (e.g., Status__c) is changed," combine these functions using an OR condition.

Example Syntax

The following example uses the OR function to check both conditions together. The formula returns TRUE if the record is new or if the Status__c field changed.

`OR(
    ISNEW(),
    ISCHANGED(Status__c)
)`

The following example achieves the same result using the || (OR) operator instead of the OR function. The formula returns TRUE if the record is new or if the Status__c field changed.

`ISNEW() || ISCHANGED(Status__c)`

Where This Formula Can Be Used

This formula cannot be used in all locations. Refer to the ISCHANGED documentation in Salesforce Help to check where the ISCHANGED function is available (e.g., Validation Rules, Workflow Rules, Process Builder formulas).

Numéro d’article de la base de connaissances

005232816

 
Chargement
Salesforce Help | Article