+ Start a Discussion
divya1234divya1234 

how to apply validation on already existing record

i wrote a validation on user to restrict email address length up to 50 characters and it is working good , but challenged is to fix any records already having a email address of more than 50 characters...as it is lenght restriction so i dont think data loader will work .looking for feasible solution.i know validation is only applied on already existing record ,but is there any possible way to update those email address or if we can send the email to user that email is no longer valid please update email lenght under 50 .
Selva Ramesh 4Selva Ramesh 4
Hi Divya,

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.

You will get errors for those that do not pass validation. You can then update the records to the email length under 50.

Thanks,
Selva
Sweet Potato Tec

 
divya1234divya1234
user email should be given by user right? is it good apporch if we update the user email adress by ourself without informing to user
Selva Ramesh 4Selva Ramesh 4
Yes it's not a good approach. You can exclude the validation rule for existing records like below.

ISNEW() && LEN(Email)>50

Thanks,
Selva
Sweet Potato Tec