 Hello friends. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So in previous video, I demonstrated you field update on record creation in Salesforce. In this video, I'm going to demo you how you can apply a field update using work for rule when record is created as well as it is updated in Salesforce. 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. So first of all, you need to search workflow rules in Quick Find. So it will show you all existing workflow rules that you created for various objects. So it is introductory page. You can skip this. So here you can see two workflow rules are available. So in my previous video that were related to field update, we record creation. This is that workflow. So I'm going to open this one so that we can review it. So here you can see object is contact. Evaluation criteria is when the court is created and rule criteria is lead source should be equals to bad. So if this evaluation criteria and rule criteria matches, then this workflow rule will be triggered. So now I'm going to update this so that it will work for record creation as well as for record updation. And we will also see how you can set multiple rule criteria with the help of and and or operator. So I'm clicking on edit. So here you can see, apart from created, there are two more options created and every time it's edited and created and anytime it's edited to subsequently meet criteria. So I'm choosing second one as I don't want to add time dependent workflow action right now. So this will be better. If you want to add time dependent workflow options, then you can choose third one. So here right now lead source is this. So I'm leaving it as it is. So first check whether this workflow rule will work whenever we create a record or edit a record. So, so I'm going to demo you this change. So I'm clicking on save. So it is already activated. So now I'm going to open my university app so that we can have contact tab. So, so here it is. So let's first create new contact record. I'm selecting lead source as purchase list and clicking on save. So in my previous video, you saw that on creation, it was working fine. If I selected lead source as web. So right now I selected lead source as purchase list. So you can see description is black. If I update this to web, if I update this to web, so right now I'm updating my record. So as I click on save, you will see description field will be filled. So here it is the test description for field update through workflow. So this time you can see why editing this record and if I choose value for lead source that is available in the rule criteria. So it matters and on record updation, it is populating description P as I mentioned in the workflow rule. So for this change, it is working fine. Right. So on creation description will be filled if contact lead source is equals to that. And on record updation, it will also work as it is working in this video. So now again, I'm clicking on edit. So this time you will see how you can set multiple rule criteria. So here I'm selecting contact email, then contains at the rate gmail.com. Right. So this is my another rule condition that email should contain at the rate gmail.com. So if your email ID is related to Gmail, then only your field update will work. So now we need to choose whether we want to put and in between or or so by default you can see at right inside and is available. So it means your lead show lead source will be web and email should be containing at the rate gmail.com then only your field update will be working. So let's put it as it is like and then later on we can modify it. So first test it as it is. Right. So you can see here and is available. That means both should be true. So let's create one more contact. So now let's create a new record. So here you can see email field is available. So now I'm selecting lead source as web and leaving it as blank. Right. So. So now I'm saving this. So email is blank and resources that so let's check that the description is populated or not. So here you can see it is not populating. So now I am adding email that is containing at the rate gmail.com. So right now I'm editing. So if you if you are creating a new record and you are populating email which is containing at the rate gmail.com and lead source as web then also it will populate description. So right now I'm updating and providing both the things and saving this record. So here you can see it is populating description. Right. So this way you can see whenever you fill all the details that are available in rule criteria, then your field of great works. So it is because we are mentioning and if I edit, then I can change this with or like this and click on save. So this time if I put a lead source as web or if I put email that contains at the rate gmail in both the cases field update will work. So let's make another record. So I am cloning this. So this time lead sources web and email is blank and I'm clicking on save. So still you will see description is populated. That is because we put or in between rule criteria. So friends this way you can choose evaluation criteria is created and updated. Or you can put multiple rule criteria along with and or so I demo demo all the scenarios so you can practice it in your all so that you can understand so you can do all hands on while creating or updating the record and putting these fields values as per the requirement sometimes plank and sometime build sometime required values or sometime any other values so that you can test whether each scenarios are working or not. Right. So 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.