function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

how to apply a validation rule for existing records???

how to apply a validation rule for existing records??? Please suggest me how to do this.

Thanks in advance.
Kiran Kumar GottulaKiran Kumar Gottula
While updating your existing records, then validations are fire. if the rule is true as given condition then the records are not update which are effected by the validation.
Nagarjuna ReddyNagarjuna Reddy
Hello Naresh,

Use dataloader or import wizard to update the exhisting records and if the records passed the validation rule will be saved and others will not..

Nag Arjun
Wenda McMahanWenda McMahan
@Nagarjuna Reddy is correct. You can export the Salesforce IDs of all the records, run an update and load the IDs onto themselves (with Apex Dataloader, or, and the validation rule will fire on all of them. You will get errors for those that do not pass validation. You can then delete or update the records that have errors.