Skip to main content
pooja biswas ha fatto una domanda in #Formulas
Hi

I need to have a validation rule fire only when Lead object Email field is edited and not when inserted.

I did something like this on Lead object.

NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})'))

so this works when a new Lead is inserted or edit  and email not proeprly specified.

Now I did like this

NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})')) && NOT(ISNEW())

but its not working.

Need help on this.

thanks

pooja

 
5 risposte
  1. 30 gen 2017, 06:52
    Hi pooja,

    AND(ISCHANGED(Email), NOT(ISNEW())) is working for me.

    Actually you dont have to check the NOT(REGEX( Email  ,'([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})'))  because email field throws that error if email is not in proper syntax. Standard validation is performed on it. Its working perfectly for me. If any problem, you can ask me. If working, please mark this as best answer
0/9000