Transcript for:
Salesforce Development with Salesforce Apex

hello everyone welcome back to Salesforce fex hours my name is Amit Singh and this is going to be the very first video of our new series Salesforce development with Salesforce Apex hours so before we get started a quick introduction about me my name is Amit Singh um most of you might been knowing me with the name is FDC Panther so I have got overall more than nine plus year for years of experience in Salesforce and moft I'm a educator at various platforms like engineering Gart Sola sfdc panther panther schools I've been fortunate enough to get awarded Salesforce MVP three times in a row I've got 21 Salesforce certifications I'm also leading Salesforce group Salesforce architect group here in India if you want to connect with me here are the QR codes on your screen that you can see I would love to connect with you guys over the various social media platforms so as we talked about this is going to be the very first video of our series Salesforce development here is what we are going to take into this video that is uh what is Salesforce what is the introduction how Salesforce has evolved then what is Apex then how we are going to uh start slowly uh putting our food into the development into the programming languages we'll learn about few things like what are the data types what are the operators then we are also going to talk about the access modifiers then we will start uh some building blocks like if else or for Loop and then at the end of this video we are going to talk about some tools that you are going to work on a day-to-day basis as a developer that is what we are going to uh cover at the end of this video starting with what is Salesforce so you might have already heard the name Salesforce because if you're here if you're watching this video of Salesforce development course that means you already know a bit about Salesforce admin you know what Salesforce is so sales force is a CRM that has been um recently not recently in early days of Salesforce it has been introduced as a CRM platform which is used for uh used by the organizations to manage their sales their customers their relationship with the partners and drive their growth and Salesforce is a Sal based platform that means Salesforce is a software as a service where you get something pre-built like if you wanted to sell something you get rebuilt if you wanted to provide the services to your customer like uh case management or call CER kind of thing then you have got service Cloud if you wanted to develop your site on top of Salesforce youve got experience Cloud if you wanted to communicate if you wanted to Market your product then you have got marketing cloud and because we know that most of the companies have the leg Legacy database and they wanted to get some data into Salesforce they wanted to integrate then we have got the product like moft composer moft itself so there are so many uh products available under Salesforce so it is a kind of a Enterprise that gives you everything whatever is needed for your business to run as we are going to more focus on the development side not on the business side we will need a free sandbox we will need the free developer org which is free forever as a developer we can sign up for our own personal or and with there we can write whatever the code is needed for us to become a better and better developer and this AR is going to help you throughout your career so I've created my AR in the um late 2014 and I've got that or with me today itself so this or whatever you are going to sign up will be your friend forever so if you don't have an or if you don't have a sales force or please use this link that you can see in your screen which is developer. salesforce.com signup and once you open this link you will see the form something like this where you will see on the top it says sign up for your Salesforce developer Edon a full featured copy of the platform for free so it is free make sure that you're using the same URL which is there in the pp because most of the time I got I've heard back from multiple people where they say that uh they have signed up but that is a 30 days trial so don't go for trial org just use the same URL again the URL is developer. salesforce.com for/ signup you need to that uh you need to use that URL provide your name like first name last name provide your email whatever your email is your uh role if you're are a a student you can select developer or whatever company provide the name of your company if you're working if you're a student just put the student as a company name select country Reon poster code because these are all the required Fields so you need to provide the details now coming back to the important part which is the username how you can uh uh provide your username is like it should be in the form of email but it need not to be same as email for example if you have an email like Amit Singh gmail.com if this is your email you might wanted to uh put something like Apex hours this is going to be your username or you can put like I'm doing at Apex hours.com this is going to be your username or you can say .com. development so if you kind of use this it is going to be easy for you to get the username it is the reason we are trying to prepare the username here because username has to be unique across all Salesforce developer environment you can also um do it something like um your first name. last name at the appex house.com and you can say keeping it Salesforce or keeping it Dev that is uh that's basically going to create a unique username for yourself then click on this uh the agreement just go ahead and agree this because even if you don't agree this you will not be able to sign it up and then just click on sign me up so once you click on sign me up it will take maybe 3 to four or sometimes 5 to 10 minutes as well to get that email landed into your sandbo into your inbox and uh the email will only land in your inbox if your email email address is correct if your email address is not correct the email will never be sent to your sandbox for example if I if I have to put my name here I'm just putting some random information uh to Showcase you or I'll just say aex hours as the company name I'm in India state if you are being to provide the state just provide the state and I'm just providing a random postal code and then click on sign me up so what it will do is it will process your details if everything is correct you will get the email after 5 or 7 or 10 minutes once you are once you've got the email please verify your email provide a password provide a security answer for that and then uh start watching the video now you can see here right you've got almost there please check your email to verify the account after some time I'll get that email now um let's talk about Apex what is Apex we have talked about Salesforce we got our own Salesforce developer a now let's talk about Apex what is an apex so Apex is a strongly uh typed uh object oriented purely oops concept uh not oops concept Apex is a pure oops programming language it is an ond demand programming language that is developed by Salesforce managed and maintained by Salesforce and it is only and only used for Salesforce development uh when we say use for Salesforce development that means we are developing some extra feature on top of Salesforce platform so you have got your or and whatever the features are available in your or you are free to entit you are use those you can use those features but if you want additional features on top of that or then you will have to use Apex as a programming language for the backend system so that's why it says that Apex is a strongly typed purely oops language that is developed maintained and managed by sales managed by Salesforce it the syntax of Apex is it looks like Java most of the things are there whatever there in Java most of the things are already there in Apex so if you are from a Java background or you already know JavaScript it will be easy for you to understand and start working with Apex the next thing that comes into the picture is data types in any programming language data types are really really important concept and this really plays an important role for us to start working with the programming language it could be Java python neex Salesforce neex or eex or anything it could be anything before we dive into the data types let's take a look into the mathematical equation that says x + 2 y - 1 = 10 where X is a uh it is a numeric integer number it's a numeric number where Y is also numeric number and if you solve this equation the answer of whatever is there on the left side should match with the right side which is 10 right so x x here is a variable which is a type of integer which is a type of numeric right so basically what I'm trying to explain it here is that variables are used to store the information and what kind of information is uh stored into that variable that is up to us as a developer and that's why this equation is based on this this equation looking at this equation it it is clear that the variable X and Y are going to store the numeric data type so what is the type of the value what kind of value we want it to store that is what our data type is so in case of uh what if you talk about what is data type data type is basically u in uh in general term data type is kind of going to take tell you what kind of data you wanted to store in a variable so data type is used to store the information about a variable and what kind of data needs to be stored that is um defined by data type and every programming language has their own data type and most of the time those are similar the syntax could be different but the functionality and the purpose of the data types is going to be same across all the programming languages here are some of the data types that I have listed like we've got object you will get to learn more and you will understand more in the coming videos about the object we have got a string a string is a data type which is used to store the information which is text which is a text in the form for example I need to store the name of a person then the name of a person is more likely into the string format even if it is uh it contains the a numeric like Bas 2 or Bas uh if there are some name like or it could be junior or senior or Junior 1 Junior 2 like that even if the name contains the numeric values it is more going to be aligned with the string data type with the text if it is a alpha numeric iner is a data type which is going to hold the whole value for example you wanted to hold 10 or 100 or thousand LHS it is going to be hold into the integer if there is no fraction if there are fraction like 10.2 10.5 then you have got two more data types which is decimal and Boolean sorry decimal and double Boolean data type is mainly used to store the two values the Boolean data type has only two values either true or false that means if I ask you are you adult you will either say yes or no you cannot say maybe or something you will say either yes or no right that is the Boolean value if I say are you working professional the answer will be yes or no are you a student the answer will be yes or no so Boolean is going to use to store this kind of values Whenever there is a there are only two possibilities of a outcome that is either yes or no you will use Boolean uh then we we have got account contacts as well these are all the standard objects account contact book then we've got list of account list of contacts all those kind of things so there are multiple things related to the data types but these are the most of the data types that you would be working with uh don't worry about the list of accounts or list of book um there is a separate lecture for collections so you will be understanding more more about list and set and map so before we actually talk about the operators I would like to uh talk one thing about Salesforce and then we'll talk about how to create the variables in Salesforce and then we'll come back to operators so what is that one thing about Salesforce which is really important for us to know is that Salesforce is a SAS based platform and that works or that operates on a multi-tenant platform when we say that it operates and works on a multi-tenant platform that means there is a full whole server and that server is shared by multiple clients how let me give you an example so you all might have seen a buildings which is uh 20 story 30 story 10 Story five story right so you might you all might have seen the buildings which are of multiple Stories the building is owned by a single entity and there are multiple persons who are living into the different flats or different apartments there inside that building right so that building is basically going to be a single unit and under that building there are multiple people who are living uh they could be the owner of that apartment or they could be living as part of the tenant right so whatever the amenities are there or whatever the I would say any kind of fail I ities are available there those will be common and those would be same for every tenant every owner of that apartment none of the owner or apartment is going to give a different treatment so if you need a different treatment you will have to pay extra and then you need to get that into your apartment it could be you buy something from a different vendor and get it installed into your apartment or you give the money to the person who is the owner of that entity or that building herec is going to get that thing done for you that is the multitenant in general ter in general term there is a building and multiple people are living into the rent uh they are living as a tent that's what Salesforce says and because of this multi-tenant Behavior Salesforce has introduced Governor limits which you will be learning about the government limits towards the end of the course now how the multi-tenant and single tenant works if you see it here right I have got a I've got an email which is an imaage which I've got from online it's not our email or not copyright to us so if you see if you talk about single tenant there will be a customer and that customer has developed an application and that application will have its own database that application will have own database that's what the single tenant says every customer has its own application and they will have their own database it could be inhouse database or it could be they have bought the database from the companies like SQL SQL or Oracle on the other hand in case of multitenant there would be multiple customers they are using the same applications like Salesforce and that Salesforce is kind of using the shared database so Salesforce has a database which they have multiple racks into that database and if you say I'm going to buy Salesforce they will say okay this particular piece of this storages belongs to you these are all the limits that are available and you cannot go beyond the limits if you will if you want to go beyond the limits you have to pay extra to us and then then we will give you the extra feature at all if it is possible for them it's not like always that you pay the money and then they give it to you if it is possible for them you pay them pay the money and the feature will be available for you that is what the multi trending platform is now after uh we understood the concept between single tenant and multi-tenant I'm assuming that in the meantime you have got the email into your inbox you have verified it once you verified it you will see some or you will be see something or like this okay it could be this or you might see the screen something like this there could be two possibilities first is this one a second could be you might see the screen like this where you will have something called this this right no matter whatever the screen you see okay go ahead click on this gear icon if you see it over here on the top side uh the third icon from the top right click on this gear icon and then select this developer console to open the developer console into the new window use control in the windows and command into the Mac OS so if you do that you will open the developer console into the new window and if you don't open the if you don't use those S Keys then you might see the developer console coming up as a popup okay now for about this whatever it is your developer console will look something like this A blank there is nothing into your developer console now we talked about creating the variables how we create the variable right so don't bother about this place what this place is this is basically called as developer console and uh sometimes people or developer prefers developer console to write the code related to Apex or Apex triggers and sometimes the developers prefer to write the code into the vs code which is now modern ways of writing the code all you need to do is you need to go to deer and select this option called open execute in ominous window I'm again repeating it go to Debo and select this option called open execute en ominous window and your en ominous window will have nothing here you will see something like this which is blank I have already uh zoomed in this screen so that you can see whatever I'm writing it in a clear way in a in a clear syntax in a clear letters so we talked about the variables right uh a string or integer or Boolean so let's say you have to store the name of a person so how you will store or how you will create a variable in Salesforce and the the simple is you need to store the name of person that's what you need to do so if you don't know anything you might you don't you you might not have any answer in your mind as of now whenever you need to store any information into your Salesforce all you need is you need to create a variable and to create the variable you need to think about you need to ask the question to yourself like uh what kind of information I wanted to store here what is the information I wanted to store in our case this is name of the person and what is the type is it numeric it is Boolean it is a fraction a decimal it is a string what it is the name of the person would be always a string so you will say a string then you could give any name this is the variable name you could give any name over here you can say maybe name and now you have couple of options here either you use the Terminator statement which is semicolon to terminate the statement or what you can do is you can use something called as equal this is the assignment operator and then use the single code and assign some name over here and then use Terminator statement so make sure that whenever you are writing the variable name your variable must be ending with a Terminator statement either you are assigning the value or you not assigning the value for example we need to store the age of a person and the age of a person is integer so we will say integer age and we could do something like this this is both the variable relation or valid the only thing the only difference it is here that on the first variable which is on line number three we are we are declaring a variable called name and we are also assigning the value which is Amit Singh right so how it is working it's a data type that's what syntax is then the variable name then it is assignment operator and then value that's what the syntax is now in Salesforce you cannot use double quotes it will always whatever you want to put as a static value it will always be within single quotes not double quotes that is not supported in Salesforce now if you wanted to see this information into the log that is for the developers only most of the time developer would like to know what is the value for this variable or what is the value for this age when your code is executing you can use something called don't bother about as of now much just say system. dbo and put the name like this if you put like this you will see the value over here you can also create some variable called Boolean and you say um maybe is admin and you can also print that so we have created three variables out of three variables we have just assigned the value to a single variable called name rest two variables are not assigned any value so what is the default value if you don't assign what will be the default value if you don't know that's not a problem we going to see it right away once you are done with this you will see something uh there are few buttons called execute and execute highlighted and then there is a checkbox called open log so you just need to check this checkbox called open log and click on execute once you click on execute whatever the code that you have written if it is valid it is going to get executed and you will see the outcome I'm getting too much time here it's not it will not take that much time and you will see something here some big lines and you don't understand anything to see whatever you have printed you need to check this checkbox called debug only and this is going to print the system. debug which you have developed and you will see here line number six says name is Amit Singh and then it says null and null now if I open the code here side by side you will see six is this line number which is Amit Singh seven is this and eight is this so the default value of any variable no matter what is the data type the value of the default value of any varable iable is null that is the important thing you need to keep in your mind the default value of any variable is null in sales force and this will help you in later point when you are debugging the things okay that's how you could create the variables you can also create the variables like I'm assuming that you all know what is account what is contact in Salesforce so if you want to create a variable an object of account you can say you just need to to use the object name account yes you see and that's it that is how you will create a variable of your account you want to create more multiple accounts like more than one account you can create the variable like this this concept which is there in line number 10 will be covered in a separate video so you don't need to worry about that that is how you define the variables in Salesforce Apex as of now we have defined the variable in developer console only later in the coming videos I keep saying you will learn more about how to define these variable at a class label or at a trigger or other labels the next topic that we have is that is operators in epex what are the different operators so operators are basically used to perform the certain actions or to perform the certain logic in your Apex code so that you can understand or you can um get to know what is the outcome and that outcome is whatever the outcome is coming either it is intended as a business or not so operators are basically I would say the whole so uh the heart of your epex code or any code where you're going to use different operators to perform some calculations to get the desired outcome in Salesforce there are so many operators available out there you can go to document the official Salesforce developer document to get and understand more about the operators but here I have listed few of them like we have got arithmetic operator which is simple for plus minus divide and multiply then we have got assignment operators one of them we have already seen which is equal pretty easy and then we'll talk about these we have got ternary operator we've got logical and and logical or equality operator increment and decrement operator safe navigation operator and null cising operator these are some of the operators that we have in Salesforce we will start with the arithmetic operator and then we'll keep moving towards the end so you are already logged in into your Salesforce a you are already there into your an ominous window if not just go to debug and open execute an this window you will be back here now to perform the arithmetic operators we need to understand on what kind of values we can perform the arithmetic operator What is the value what is the data type so it you will find it it is either integer or decimal these are the decimal or double right then only you can perform the arithmetic operators and what are those arithmetic operator one is plus one is minus and then there is a divide and then there is multiplication so let's create two variables integer a and we will say AAL to 10 integer okay there is typo inder b equal to 10 and now we need to perform plus minus divide and multiplication right I'm going to directly use the debug state mean but you could create a third variable fourth pH that variable and do the assignment how let me show you basically I would say integer sum equal to a + b so whatever the value whatever the value that we have in a and then whatever the value we have in B do the calculation and assign it back to the variable called sum so here we are working on three different operators not three two operators one is additional addition operator which is plus and another one is assignment operator which is equal so whenever there is this operator comes equal that means whatever is there on the right hand side do the calculation and then store it into the variable whatever there is in the left hand side that is what here we are doing so how it will do behind the scene it will say 10 + 20 = to 30 so if you go and do print sum you will see the information is correct okay I'm not going to perform minus um divide and multiply I will leave up to you so that you guys go ahead and play around with this the basic thing is there but you will need to go ahead I'll highly encourage to um go and work around all these operators so 10 + 10 is going to be 20 and if you execute this we will see that 20 will come as a part of output when we check this checkbox debug only you see here it is 20 that is the simple operator that is arithmetic operator then there were some assignment operators let's talk about assignment operator first and in the assignment operators there are like plus equal minus equal multiply equal or divide equal these are the assignment operators so how does those work so let's say we have these two variables or even let's say only one variable called integer a and now I wanted to add 10 more on this variable a simple value I wanted to add 10 more into the value what is there in variable a so what is the traditional way we will do we will say a equal a + 10 that is what that is how we will do right we will say whatever the values there in a that is 10 add 10 more into this value calculate this because this is on the right hand side and assign it into the left hand side variable that is a and that is true we will get 20 if we try to debug it we will get 20 right this is one way of adding a value into the variable the second way of adding a value is we can say A Plus equal 10 so what does what does does this mean is whatever the value that we have in the variable called a add 10 into that value and assign it back to the variable a so whatever we have written in the top is basically this is equivalent to this or we can say this is equivalent to this both are same in both the cases you will see the same result let me execute it and tell you you will see the same result in here as well you will see 20 is coming as part of debug statement so that is what your assignment operator say this is also known as increment assignment operator similarly you could do minus you could do divide and you could do multiply whatever you will do this is going to say whatever the value you have in a multiply it by 10 and assign it back to a now if you talk about this this specific thing is equivalent to this thing that's what our assignment operator says again I have tried it for the plus only go ahead and try it for multiply minus and division as well next that we have is tary operator and before we actually talk about trinary operator we will have to talk about some other operators uh some other building blocks so let's park this as of now and we will pick it later on similarly for logical and as well um equality operator as well increment and decrement operator these are mostly used for the for Loops so when we will talk about for Loops we will understand that as well and these two as well so let's basically jump into the different thing which is uh access modifier we'll talk about later on let's jump into the building blocks let's jump into into building blocks first and then we will come back to the variables and then we'll come back to the access modifiers modifiers asress so we have got if and else statement okay if and else statements are basically the uh control statements we could say control statements is like for example let me give you let's say if you complete your homework you can go to play if you don't complete your homework you will have to wash the cloths that's a condition a simple condition let me uh draw something for you so if I have to draw here let's say there is a there is a actor over here actor could be any user and then here there would be a decision element and the the decision element is pretty simple assignment completed if it says yes okay if it says yes then what will happen is play football player football if it says no then you will have to was the cloths you cannot play the you cannot play the football so you have to do this so this is a simple uh if else it says if some condition is true then I'm going to do this if some condition is not true I'm going to do this or you will have to do this this kind of logical statement you could also put into your programming languages by using the if statement now this is a very simple thing if I have to write a if statement over here this is pretty simple here so how you will write is you will say if and here you will have condition we'll talk about that condition and then you will have opening and closing curly braces and let's say if the condition is true that means play football or your whatever you want to put as a logic over here so you will have logic here else that means me there is nothing so you can say wash cloths that's that's basically the thing that you have related to your if else your if can also be there it can also stand without else condition so you could say if you have completed the assignment play football otherwise don't do anything sit ideal so it doesn't needs the if statement doesn't needs to have a following else statement but if you want you could have multiple else stat you can have else statement as well you could also have multiple L uh you could also have multiple if statement which is known as n nested if else how let's first understand the scenario for that the same scenario I'm going to copy paste over here sorry let's copy paste it over here yeah so it says assignment completed play fo ball okay and then if assignment is not completed add another um condition and give a chance one more chance and you will say a homework is not completed you will say um cloths or clean if cloths are clean if the condition is yes then go ahead and play football if the cloths are not clean then go ahead and wash the cloths now there is a nested there is a two level of condition over here it says okay tell me have you completed your assignment if answer is yes okay go and play the football if answer is uh not yes then again have you clean your cloths have you completed the Wasing of your cloth if the answer is yes then okay go ahead and play the football if the answer is no wash cloths so there is a two level of condition checking over here and that is where the nested FS come here so it says if condition one if condition one then you will say else if condition to and then you will say else so these are the this is basically nested nested fls that we have seen it's nested it's nested FS if else there would be multiple condition and based on multiple condition you would like to uh play around with the things you would like to put the logic there into your code let's see how this works in your code in the working demo so let's quickly create a variable call integer is equal to maybe 40 or 50 that's fine now we need to say if the age is greater than 60 okay age is greater than the these are the condition age is greater than 60 a is less than 60 and and greater than or equal to 50 else so if if our age is greater than 60 that means it's old days old person and then if age is between 50 to 60 we will say U um we can say maybe okay it's a it's old a we'll say okay we can put anything that's not a big deal you could say medium age else we could say youth um instead of four here y that's what we are going to say now okay so these are the three different conditions there is a condition there is a requirement where you are given a number called Inger Age based on the age you need to tell if the person is old age person if a person is in a medium is or its a person is youth how you will identify how you will do that and this is where we are going to cover multiple things as well so first we will use if statement as we talked about opening and closing parenthesis that is also known as um the yeah these are also known as the bracket the small brackets and then opening and closing parenthesis not parenthesis curly braces known as flower brackets okay this is the syntax of your if and here you will have to put a condition this condition must must needs to give the output in the form of either true or false this condition cannot give anything else this must need to give you either true or false so what we need to check if this variable called is is greater than 60 this symbol is greater than and opposite to this symbol is less than this symbol is greater greater than or equal and opposite to this less than or equal like that okay so we are saying greater than or equal let's make it as greater than or equal to 60 we will put system. dbug and we'll say old person if that is not the case if this is not the case then we will check another we'll say else if and we will check this age is less than 60 now there is a two condition a is less than 60 and 40 basically it is a between 40 to 60 so how you will put it it's and condition a should be greater than r equal to 40 and less than 60 so here you will use logical and and this is what your logical and is 2 m per when it comes together it would be logical and logical and means both the conditions whatever you are putting here should be evaluated as true if any of the condition is not true your condition will never be satisfied the your logic whatever you are wrting uh your writing here will never be executed that's what the logical and says and on the other hand if I use logical or which is the two pipe sign if we use these that means either this condition or this condition is true then this logic will be executed so R is for any condition is true and is for every condition is true and if this is not the case then we will say else the person is youth the person is youth so we have used basically uh I have used the nested F Els over here to make you understand all the concept in a single go like if a is even I can get rid of this part not a problem this is pretty simple if a is greater than or equal to 60 the person the debug statement will be printed as old person that's it okay let's execute let's not directly go into Nesta if else they it there is nothing because because this piece of code was never executed but if I make it as 70 and execute it then you will see that person that piece of code was executed and we got that person is old person because of age is 70 that is the simple if statement without else okay now coming back to the previous option in this case we could say else say system. dbug and we could say not old a not old as person and make sure you use the Terminator statement if you don't use if you don't use you'll get the error missing semicolon at this line number nine and you go to line number nine and you forgot you put your scratch your head and forgot find out where is the error so you will have to use semicolon and execute in this case we will find the statement which is executed in case of else not the old AG person right that is the F else now coming back to the whole logic which we had earlier written now here is what we have the condition what will have what will happen it says AG is greater than 60 based on the current value it will say false then if it says false then only it will go to this condition if this specific condition is false then only it will go to this condition then it will say Okay age is less than 60 that founds true then age is greater than our 40 that is found true that means the value is true then this will get executed okay let's go ahead and execute this it says medium age right we've got mediums that is good that is the line number eight now if I say let's let's if I make it as maybe 26 in case of this variable value a is greater than 60 false a is less than 60 it is true a is greater than 40 false so true and false means it is going to evaluate false that means this condition is also false then it will go to else and it will be printed let's execute this you can see here youth is here so that is how your if condition works that is how your else if condition works that is how your law logical and works that is how your logical and works and if I change logical and to logical or then this condition will true in case of this variable because now AG is less than 60 it says true if this is true this condition will never get executed that is that is also one thing so your if condition if there are multiple condition inside if statement then it is going to evaluate from left to right it will always go from left to right and it will start evaluating one condition at a time and if all the conditions are true in case of and it is true if any condition of false it is false in case of R any condition true is true okay that's how your logical and and logical R operator works now let's talk about null cacing operator before we talk about uh yes let's talk about uh null cising operator before we talk about safe navigation operator okay so how the null cising operator works so as we know that the default value of this variable is age sorry null any variable the default value having age sorry my bad any variable table will have a default value of null so what null cising operator says if you know that if you know that okay if the variable value will have a null value I'm going to return something as a default value for example if age is null instead of putting like this if age equal to equal to null then put a is equal to something called 30 if the value of a variable is null this is equality operator which checks if the value of age is null if this is true then assign the age assign 30 as a age that is what the simple condition that is if condition we have now what Salesforce says is they have given us the null cising operator which says with the help of null col cising operator you can get rid of this if statement how you can get rid of this if statement is that you can get rid of this whole line you could say age equal to age colum colum 30 so what it says return left operand if there is a value in left operand otherwise return right right operand so this is left operand and this is right operand in case of a is is having null value it will return 30 let's debug it it is pretty simple if your variable is having a null value this value will be assigned to your variable simple now let's execute and we will see 30 as a value for our age variable you see here see over here now if I change it if I change let say a is equal to 23 now if we debug it what value we will get correct we will get 23 we will not get 30 now because there is a value in this variable now if you execute it now if we execute it you will see it is now printed printing as 23 that is how your null cacing operator works there is one more operator which is safe navigation operator that I'm going to escape as part of of uh this video because uh for that I might um I will have to tell you some uh more uh concept which I don't want to rotate everything in the single video so that's basically what you have got as part of your operators and I believe with that we have covered all the operators which are needed over here