 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demo differentiation between these two options that is available in evaluation criteria of workflow rule. So whenever we create workflow rules, so we have to set evaluation criteria. So there are three options. So right now I'm going to differentiate created and every time it's edited. And second one created and any time it's edited to subsequently meet criteria, right? So we will talk about how they both work and what are the differences. Meanwhile, if you want to watch Salesforce training videos, you can search my name Sanjay Gupta on YouTube and you can follow my YouTube channel. So I already created this workflow rule that is for send email alerts. So first time choosing this option. So the main difference differences are two. So first is shown here. If you choose this option that is created and every time it's edited. So it says you cannot add time dependent workflow actions with this option. But if you choose this one, so you can add time dependent workflow actions. So this is the first difference, right? Now I'm choosing this option. Then rule criteria is if lead source is equals to web, then this workflow rule will be fired, right? So I'm saving this. So here you can see evaluation criteria. The rule is evaluated when a record is created and every time it's edited and rule is the rule criteria is lead source should be equals to web, right? And if we chose this evaluation criteria, so we cannot add time dependent workflow actions. So this is the first difference. And email alert is available with immediate workflow actions. So it will send an email. So if I open this, so here you can see email alert is available. I have chosen this email template that is available in this org, right? And email will be sent to email field of the contact object, right? So this way, I set up this workflow rule. Now I'm going to demo this. So let me open my university app. I'm opening this. It will be available in new tab. So here contact tab is available. Now I have to create new record. So this time I'm mentioning first name, last name only. So my test email one. So this is first name, last name. And I'm leaving this lead source as blank, right? And clicking on save. So evaluation criteria is both created and updated. So it is matching, but rule criteria is not matching because lead source is blank. It should be web if you want to trigger any email. So here you can see we are not receiving any email. So this is my email box. And this is not available here. And I'm putting email address here, right? And I'm mentioning lead source as web, right? So this time I'm updating. So whenever you are creating your first record on contact, if you mentioned email ID and if you don't mention lead source, then also email will not be triggered. So you can test it out. Right now I'm filling both the things, lead source as well as email ID and clicking on save. So a rule criteria will match and you will see an email is available here. And this is the name my test email one that is available in email template in form of merge field. So it is sending an email, right? Now, what happens if I added this record again, because lead source is where email is already available. If I update this record again for any other field, like I put mobile number 123456. So I'm updating mobile field, not any other field. And I'm clicking on save. Right. And if I move to my mailbox, so you will see one more mail is available here. Right. So now you understood. Once I updated lead source and that is making rule criteria is true. And after that, whenever I make changes in the record with any other field, then also it is a firing workflow rule. Right. So this is the drawback of this evaluation criteria. It fires workflow rule every time whenever the rule criteria matches. So once you modified your field, that is lead source equals to web. So first time your rule criteria was matching. So it triggered the email that is correct. But if you are updating any other field, then also it is firing the workflow rule every time. So that is not appropriate. So we need to edit this. And this time we can choose this one created and any time it's edited to subsequently meet criteria. So whenever your criteria will be matched while updating or creating the record, then only your email alert will be fired or email will be sent. So you can read this help text. The rule is evaluated when a record is created and when a record that doesn't meet criteria is edited to meet criteria. Right. So I'm choosing this one and I'm clicking save. So again, I'm going to create new contact. So first thing is my test. Last thing is email to and this time I'm also putting email address. So I provided only email. I'm not putting any lead source. It is blank and I'm clicking save. So our rule criteria will not match. So you will see there will not be any email in my mailbox. So it is not sending any email right now. I'm doing a contingency fresh so it is not available here. Now, if I go to that contact, right, and now if I added lead source to web, then it will send an email. So here you can see it is throwing an email. So that is available here. Right. Now if I added this record for any other field, like if I put mobile number here. So this time I'm not editing lead source. This time I'm not editing lead source. I'm editing any other field. So you saw that whenever we update the particular field which is available in the rule criteria and it matches then only this will be fired. So right now we are not editing this lead source. We are just editing mobile number. So if I click on save. So you will see work for rule will not trigger it will not throw or send any email because we didn't do anything for updating lead source. Right. So friends, if you want to fire your work for rules, whenever you edit a particular field that is available in rule criteria, then you need to choose a third evaluation criteria. That is created and every time it's edited to subsequently meet criteria. So it is better. And if you want to edit any, any field and you want to fire your work rule as per your rule criteria. And if you don't edit the field which is available in rule criteria and if you edit another field that is not available in rule criteria, then also you want to fire your work rule, then you can choose this option. Right. So there are two differences. One is related to time dependent work reaction. And second is like when you want to trigger your work rule. So I demonstrated you both the things. So choose evaluation criteria accordingly as per your requirement. So I hope you understood whatever I demonstrated in this video. If you want to watch more Salesforce training videos, you can search my name Sanjay Gupta on YouTube, and you can follow my YouTube channel. Thank you for watching this video.