 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So in this video I'm going to cover some scenarios related to validation rule. So I will demonstrate you how you can use, how you can apply this blank check in validation rule, how you can use and or not a pick list check if conditional is new. 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. Here various playlist related to Salesforce and other programming languages are available. So now I'm going to demo these one by one. So first I'm going to create new validation rule. So object is account and here let's say its name is validation rule. Then to apply is blank you can search it here and insert. Then here you can put a particular field that you can insert from here. So let's say I'm putting annual revenue. So if annual revenue is blank and you are creating or modifying a count record, then this validation rule will fire. So let's say I'm putting a generic message that is error occurred, right? And top of the page. I'm saving this. So this way you can use is blank. Now if I move to any account record and if I try to modify this record and if annual revenue is blank, then it will throw an error. So I'm just editing this. I'm changing this value for rating and I'm leaving annual revenue blank. So you will see it will throw an error. So here it is. So this way you can apply is blank check. Now I'm editing this validation rule. So now I can use and or and not. So now let's say I'm using and condition first. So and condition. Let you join two conditions. And if both are true, then this validation rule will fire, right? So here let's say is blank. This is revenue. And along with this, I'm going to use this one is new. So if I use is new, let me search it here so that we can read the description as well. So here it is checks if the record is new and returns to if it is new. Otherwise returns falls. So I'm picking it and closing and so now if your record is new, it means you are creating your record and annual revenue is blank. Then only this validation rule will fire. Let's check syntax so it is not throwing any error. So I'm saving this now that this time if I modify this record. And annual revenue is blank. Then it will save properly. No error will be there. But if I try to create new record. If I try to create new record. Let's say here test and annual revenue is blank. So it will throw an error. You can see. Right. So this way I hope you understood how we can apply and condition. Along with is blank and is new. Now, if I put or here. So it means either annual revenue is blank or account record is new in both the scenarios. This error will occur. Right. So you can replace and and use or if you want your validation rule should fire if anyone of the condition is true. Right. So I think you can test it yourself. So now I'm applying and and here I'm applying not for is new. So now what will happen if annual revenue is blank and account record is not new. It means you are not creating record. You are just modifying the record. Then only this will fire. If you are creating new record, then this will not fire if annual revenue is right. So I'm saving this and let's say I'm trying to modify this. So now both condition will be true. While I will be modifying this. So not is new means we are modifying the record and annual revenue is blank. So it will throw an error. Now if I try to create new record. So our one condition is false like we are creating new record. It means not is new is false. Now if I put annual revenue is blank, then also it will create a new record without throwing any. So this way you can use not to change the meaning of a particular situation. So it will convert true to false or false to true. So this way you can apply this. I think you got to know how we can apply is blank and all and not now. Two more things are available. Pick list check and if condition. So let me apply those. So I'm removing this. To check pick list value. There is a method that is is pick well. So here you can see it is saying check whether the value of a pick list field is equal to a string literal. So here we need to put the pick list field. So I'm inserting. Let's say rating. And here I have to put the value. So I'm putting hot. So if rating field value is hot, then this validation rule will fire. And now this will work on both the scenarios while creating or editing the record because we removed his new. So I'm putting this as hot and clicking on save so you can see it is showing error occurred. And if I put any other value and try to save, it will save properly. So this way you can apply a pick list check as well. And if you want to add more conditions, you can put those as well by putting comma and using and or all. Now, one more is left that is a condition. So I'm removing this and I'm searching for it. So here you can see we need to put a logical test and true value and then false value. So let's say I'm going to put a test here. So now again, I'm going to use is pick well inside this. So is pick well here I'm putting field as rating. And if it's value hot, then from here I'm returning true and from here I'm returning false. So this way you can use multiple functions to nesting. Check the syntax. Yeah, it is correct. So this way also you can add if condition. So now if I modify this and I put rating as hot. So it will throw an error. And if I put any other value, it will save properly. So this way you can apply these things. I hope you understood these are very much essential to know because in every scenario, you will be using any one of them. So I hope you understood how we can apply these things in validation rule. 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. Here various playlist related to Salesforce and other programming languages are available. So do follow it. Thank you for watching this video.