Skip to main content
pooja biswas 님이 #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개
  1. 2017년 1월 30일 오전 6: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