Skip to main content

I want to create a validation rule in which it will run only on the update of the status field, not on the insert or newly created record.

So I put the condition

And(Not(isnew()), ischange(status), profile<> "system admin")

And also, I have a flow that runs after insert, not on update, that changes status. But when I try to create a record, this validation triggers, and an error comes up: Flow exception error: can't run this process because of this custom field validation: "can't change status." Now why this validation triggers as I put condition not(isnew())?

 

Can anyone help me with this?

@* Salesforce Administrators * @* Salesforce Platform * @APAC Architects @Manoj Nambirajan @Christian Ruthner

8 risposte
  1. 25 giu 2025, 17:10

    As Ravi said, knowing the order of execution is key here. "After" flows run after the record has been committed to the database, so any updates to the triggering record are considered, well, updates. 

     

    Generally, when changing a field value on the triggering record, use a "Before" flow. Would that be something you could do? Keep in mind that Before flows run before before triggers (again, knowing the order of execution is key), so consider all automations on that object before making changes.

0/9000