1

Imagine I have two checkbox fields in an Account: "Not a programmer" and "Programs Java"

I can set up a validation rule with an error condition formula of: AND( Not_a_programmer__c = True, Programs_Java__c = True )

This rule won't allow me to save a record if both boxes are checked.

But what happens to existing records, that already have both boxes checked? How is that error thrown, and how is that reported on?

I'm asking here instead of testing it out because I only have access to a live environment.

4

1 に答える 1

4

Validation rules only execute when a record is saved (inserted, updated, upserted). See the Order of Execution (#4) document for details.

If you want to validate all existing records, the best method for doing so would be running a report with a filter for your fields or you could use a Scheduled Batch job to log the errors.

于 2012-06-12T19:01:55.540 に答える