 Hello, everyone. I am Sanjay Gupta. Welcome back on Sanjay Gupta Tech School. So as you can see, this is day 98 of Salesforce learning bootcamp. We have a couple of more sessions remaining in this bootcamp. So this 100 days or you can say 100 session bootcamp, I just started in January and it is about to end. So in today's session, I will be talking about Salesforce development question and answers. So as you can see, I have total 117 interview questions which are based on Apex trigger, test class, asynchronous Apex, APIs, integration. So you might be thinking like what all those questions are. So let's discuss a few of these questions and before proceeding further, I just want to share one information with you, like if you want to have this document with you. So it is already prerecorded. So here, if you go to study Salesforce, so under interview preparation, in Q&A section you will find this. And in my telegram channel also, you will find the PDF of this deck, which I am sharing in front of you. Okay, so I hope you know from where you can get this. If you still are not able to find the telegram group, so telegram group and telegram channel, both the links are available in the description of this video. So just go through the description of this video, you will find the telegram channel or group and if you go to the files section there, you will find this deck. Still if you are not able to find, so just bring me in the telegram group, I will reshare it, okay. So now I'm starting with a question. So there will be few basic questions that I will be skipping quickly and the difficult one we'll be discussing together. And if you have any question that you want to ask, so you can just paste that question in the chat, okay. So moving forward, okay. So this is the first and basic question, like if you're, it basically belongs to freshers. If you're a fresher, so interviewer may ask like, what is Apex? So you can just say Apex is an object oriented programming language and it is similar to Java, what all syntax we have in Java. So it is also having same syntaxes and it is like strongly typed as it validates references to objects at compile time. You can integrate it with the database. So all the S objects that you're creating no matter whether it is custom or standard. So you can interact with those S objects with the help of Apex, right. And if you want to implement any automation or you want to call some web services. So for that purpose, you can also use Apex, right. So all these answers, if you explain to the interviewer, so it will give a good impact, okay. Now moving on to the next. So data type, it is very basic question. So I'm just skipping it. Then yeah, this is important question. What are collections available in Apex? So basically we have three collections available in Apex. So our first one is list, second one is set and third one is map, right. So basically if we compare all three collections or set, sorry, list basically store like values, it can contain duplicate values as well. And if you want to get any value, so we can apply indexes, right. And we can store any type of value. So if I go to the next slide, then you will be able to see. So these are the data types which we can use to create list. So we can create list of primitive type, collection, S object, user defined type or built-in type. So user defined type or built-in type are related to basically Apex classes. So if you have predefined Apex classes or user defined Apex classes, so for those also you will be able to create some list. And it is ordered collection, so all the elements will be stored one after another. So that's why you will be able to access the values with the help of index, right. And you can say some examples as well if it is a written as well like one-on-one interview and you have a piece of paper where you can write some example or like it is online interview if you are able to share your screen. So these are the examples that you can type like we can create a list of string account in teaser, so accordingly you can explain, okay. So this was list, now we have set. So set is basically an ordered collection. It cannot contain duplicates. So this is the major difference between list and set. So in case of list, we can store duplicates, but in case of set, we cannot store duplicates. So it always stores unique values, right. So that you need to remember. And the data types you can see, these are same. So the data types which we can use for list, all data types we can use for set as well. So primitive collection as object, user defined data type or built-in types, okay. Here indexes are not available. So you, because it is unordered, so you cannot use index to access the elements. So these are some examples. So if you are following all the sessions of the bootcamp, so you are already aware of this. Then we have map. So a map is basically a collection of key value pair. It is important. So in many of the interviews, like interviewer asked like, can you elaborate about map, the working of map? So key value pair, keys should be unique, values can be duplicate. And data types you can see, primitive collection as object, user defined data type, built-in type. So key and value can be of any data type, okay. So these are some examples that you can mention, right. So next is a difference between for loop and for each loop. So for loop basically runs for particular rotation, whereas in for each loop, you can just iterate a list, list, set, map, whatever you want, right. So these are the examples. So I hope like you got to know, like in this document, all the important interview questions are listed. So it is very much important to go through with this document. And if you want to find this document, I'm again iterating this. So document link is available, document is available in the telegram group or telegram channel. And both the links are available in the description. So from there you can get this and mark my word this, this document is basically related to development. So that's why in today's mock interview, I am not like interacting without any document. So document is important for today's mock interview because you should know where all the questions are collected along with the answers. So knowingly I just used this deck in front of you so that you can know the source. So next is what is SOQL? It is very important question. So you need to prepare, like if you want to interact with your SOB, you want to get some data. So for that we use SOQL and how to write it. Then SOSL as well. So many interviews can ask like difference between SOQL and SOSL. So you should know the differences. Then developer console, I think it is very easy. Query editor, yeah, we have in developer console that you should know. Then what is execute anonymous window? So if you want to run any Apex code and we want to select particular lines that we want to execute or we want to open the logs and code won't be saved. So these are some key features if you're working with anonymous window that you should know. Then what is system.debug? I think it is very easy. So I can skip, I hope everybody knows about this. Then what is DML? This is very much important. SOQL and DML, these two are very important, right? So if you are like, if you are experienced as well. So then also interviewer can ask like what is DML and what operations we can do? So insert, update, delete, undelete, these all operations we can do. And merge operation also we can do with the help of DML. So when you explain DML, so next question will be like what will be the governor limits, right? So governor limits you just need to remember for a few. So here we have a table with the help of this table. I think you can learn the governor limits, right? So whenever someone is asking about SOQL, DML, so you can just say like these are the governor limits related to those. Okay, so all these governor limits are collected here. Then next is like what is database class and can you compare DML with database class? So in database class, lots of methods are available. Here you can see the list, insert, update, absurd, delete, undelete, merge, right? So then these are the features of database class. So basically if you have a list and if it is partially like inserted or updated, so few records are successful and few are failing. So that kind of scenario we can implement with the help of database class methods. So here you can see the comparison between DML and database class methods are listed, right? So basically you need to compare. So in DML, we need to apply, like if we have any error coming up, so we can apply try and catch blocks in database methods like we can have partial success or partial failure. So that kind of scenario we can implement. So it depends on the business requirement which approach you want to implement, either go with DML or go with database class methods. But it is important interview question. So you should go through that. Then exception handling, what is exception handling and how we can implement it, right? So if you want to control or you want to handle runtime error, right? So exception is basically runtime error. If you want to handle that, so for that you can implement try catch blocks, okay? Then parent child SOQL, it is also important. How we can implement it? What is the purpose? What is the relationship name? How we can find that? So everything is available here. So you just need to prepare it well. So there will be two questions. One is parent to child SOQL and one is child to parent SOQL, okay? So there is one question in the chat. Vishnu is asking when do you use the future method, the trigger for a call out. So basically if you want to run certain process as synchronously, not immediately. So in that case through trigger you can call future methods. So future method will be running in the background whenever resources are available. So for as synchronous processing we implement future method and we call it. So for web services like where we know like immediate response won't be available. So in that situation we can go with the as synchronous thing. So these are two questions, parent to child and this one is child to parent. So both are basically using underscore underscore R. So it is already explained in the bootcamp. So through these slides I think you will be able to prepare its answer as well. Then debug log is also important. So whenever you are running any code so through this log what information you can see. So we have database changes, we have HTTP call outs. We have Apex errors, we have resources used by Apex. We have automated workflow processes. So all these things with the help of logs we'll be able to identify, all right? So everything you need to remember like if this kind of question comes to you so I hope you understood like why I'm not picking question and answering why I'm using this document because there are lots of question and in one hour session I cannot cover all the session so that's why knowingly I'm using referencing this document so that whoever is watching this video they see like there is a document there is a document created and how you can get this document this document is available on study salesforce.com this document is available in the telegram group or telegram channel of Sanjay Gupta Tech School and those links are available in the description you can find it from there. So after discussing few things about Apex now next we have trigger, trigger is also important if we talk about interview, right? So in trigger like basically what is trigger it is very much important so here you can see six points are listed. So in one paragraph like one by one step by step all these points you need to explain. So triggers are basically initiated whenever a record is inserted, updated, deleted and undeleted we can perform both operations like before and after then whatever things we cannot do through point and click so it is like used for that purpose then we can do things using triggers that we can do through Apex including execution of ISOQL, DML or calling custom methods. Trigger we can create on both standard and custom objects and by default it is active so this is basics of trigger, right? Now there can be multiple questions on trigger like how to write trigger, what are the syntax, right? Then this is like types of trigger before trigger after trigger then what all events are available so you need to remember all these seven events before insert, before update, before delete after insert, after update, after delete and after and delete, right? These are also important then trigger context variables this is also important like is executing what does it mean is insert, is update so whenever we implement triggers so we generally use these context variables is delete, is before, is after, is undeleted, size, right? Okay, next is trigger.new and trigger.new map this is also important so new is basically list and new map is a map and both contains newly created records, right? So if you are like doing insert, update, undelete triggers so in that case data will be available into trigger.new and if you are doing insert, after insert, before update after update and after and delete then this trigger.new map will be having the data, right? So in this depth you need to remember these things then we have trigger.old versus trigger.old map so before update, after update, before delete, after delete and same for this old map so old is again a list map is again, sorry, old map is a map, right? So you just need to remember the events as well like on which event these list and map will be having the data so Shubhashini is asking can I do a DML before call out I think yes prior to call out like if you are going into the call out before that I think you can do synchronously anything what to do when records are failed when performing batch epics so I think it will show you some success failure results or maybe like in your final method you can have something so Vishnu without future annotation if you want to call out so for that I think you need to use integration that's the API so money is asking can we use nested for loops in let me just check it okay nested for loop in epics class and trigger yes we can but you can avoid that nested loop with the help of map so we generally avoid implementing nested loop so if you can use map so in a loop you can avoid then next question can be like can we call epics class through trigger so yes so we need to implement a trigger then we implement trigger handler so it is part of best practice so whenever any trigger specific question comes to you you need to explain it as per best practice like if you are implementing a trigger so it would be good like we implement trigger handler separately okay so Arun Kumar this only channel I think it is related to service cloud so if you are talking about service cloud then I think it is mandatory to learn as an admin like it is optional but if you are specifically working on service cloud then it is must okay moving next you need to know that trigger best practices so I think in one of the previous session I already covered so one trigger per object bulkify logic less trigger avoid using SQL and DML inside the loop avoid hitting government limits avoid nested loops try to use map incident use static Boolean variable to avoid recursive trigger right so these were some best practices that you can throw then what is recursive trigger so this is also important so in case of like update scenario it happens so you need to know what is recursive trigger you can give an example as well so here one example is written like when you update a record from UI then trigger will be called now in trigger as well you applied update DML so it will call same trigger again and it ends up as recursive right so you can create a static variable with the help of that you can prevent then can we apply validation through trigger yes we can use add error method so we can apply that can a trigger call a batch class so yes we can call a batch class in the trigger as we do in the normal apex code then can a trigger make a call apex call out method yes we can call a call out method in apex trigger but the only condition is that it has to be an asynchronous call out because the trigger flow cannot wait on the response received by the call out method so I think this answers for those who are asking about the call out thing then what is trigger bulkification so for multiple records like if you are a trigger is able to perform the operation so that that will be called as a bulkified trigger is there any limit on number of triggers defined on an object yes we can define as many triggers on an object but it is recommended to have one trigger per object as the order of execution of different trigger is not guaranteed and any trigger can start execution it's execution first right then trigger an order of execution so this is like these are lots of steps so you need to go through and you can make a summary of this so total 20 points are available so generally this much lengthy questions are not asked but if you can remember it step by step so that would be good then what is apex test class this is also important right test classes what we can do with the help of test class you need to remember this then benefits of apex unit test okay so all these questions are already having some answers and I already elaborated these answers in detail these are not having one liner answer for each question you can see lots of points are written okay so everything is available here and maybe what I will do after completion of this session like in the telegram group as well as telegram channel I will be sharing these PDF documents once again for admin, flow, development and LWC right LWC I will be like sharing tomorrow so I will be sharing these PDFs with you again so that you can prepare for interview as you can see like Salesforce announced 3300 new jobs and I think soon other companies will also like hire last number of resources as freshers or experienced folks so like you should be prepared no you don't know like whenever there will be an opportunity okay so I think this is important about test class and then test class syntax this is also important we need to use at the rate is test annotation before the class and before the method as well right then is test and test method the differences you need to know then test dot start test and test dot stop test this is also important so here you can see four points are available and if you want to control government elements for each method those you are implementing in the test class so for that purpose basically we implement test dot start test and test dot stop test this is also an important interview question then this is the example so I think with the help of this example you can back your answer so real time examples are very much important if you are able to do and next is at the rate test setup so for bulk data creation in a class in a test class we can use at the rate test setup then we have test utility or data factory class so there is one question like what is the difference between at the rate test setup and data factory class which will you prefer so basically if you are creating bulk data in the test class itself so in that case you can use at the rate test setup but if you want to reuse that bulk data that you created in one test class into another test classes as well so in that case you can implement test utility or data factory classes so these are two ways to create bulk data generally we prefer this data factory class because this class methods can be called into any test class then a certain test class this is very much important so in each test method you should implement this so that you can make sure whatever functionality you are testing with the help of test method it is working fine so assert and assert equals these are two methods so in assert we need to pass two parameters in assert equals we need to pass three parameters and that third like message parameter in both the methods are optional okay so next is Apex test class best practices that everybody should know if you are working as a developer so these are some points that you need to know then is test see all data equals to true annotation so you can see the complete description is available here so you can just go through and learn this so Shahid telegram channel link is available in the description of this video if you see the description of this video you will find that still I am going to share both again so I have one telegram group and one telegram channel join both so I shared both here so first is telegram channel and second one is telegram group so in telegram channel I am updating everything where only I can post the things and telegram group is for you so that you can collaborate with each other right so I will be posting all these PDFs into telegram channel so Shrikanth is asking difference between test method so both are same if I go back so we have two things either it is test and test method so the way of writing is different rest are same so generally we prefer this either it is test annotation because with this way it is very easy to identify like this is a test method the next is assert this we already discussed then best practices then see all data equals to true then using the run as method is also important so generally whenever we implement any test class so that code runs in the system mode admin but if you want to run any method as particular user so in your test class you can use run as method right so all the necessary things that we need to know about that it is written over here so you just need to go through depth then this is the example like how we can implement so let's say query profile then I am initiating some user and then that user I am passing into system.run as and then I am writing the code so this much code you need to write in your test method so in that case like you can just test whether your code is working fine or not then as in course it is also important why we use it so call outs then if you are having any operation which requires higher governor limits then code that needs to run at a certain time so you have schedule apex classes for that so these are some asynchronous processes that you can implement so benefits user efficiencies, scalability, higher limits this is a table which is very much important so it kind of gives you a summary like overview and the difference scenarios then governor limits and execution limits and asynchronous processing that you need to go through challenges, what is future so I think this we already discussed in our bootcamp sessions also so what is future it is mentioned over here so all the necessary things summarized so this is a summarized document this PDF if you go through so it will it will make you ready for the interview anytime then when to use future methods right so everything is written over here then best practices of future method right then things to remember why using future methods so all the things I have summarized whatever important things you need to know what is batch epics then how batch epics works then which method we need to use in batch epics so there are three methods basically start, execute and finish then what is the use of start method what is the use of execute method then what is the use of finish method so all three methods are explained here in three different slides right so I hope now you are realizing like how much important this document is so everybody those who are watching this session right now I think you might be like you might be thinking like can we have this document so after this session I will be sharing it on telegram channel so that you can have it then best practices queueable epics then benefits of queueable epics so I think with the help of this document you will be able to like go through with all the key concepts those you need to know before jumping for an for a developer interview right then this is crone expression that we need to know like how we can create it what is the meaning of each and every element that we are using here then scheduling epics, api integration how many types of api about rest api, about soap api bulk api, streaming api then api details right so when to use rest api, when to use soap api when to use chat rest api user interface api analytics rest api then when to use bulk api data api, so everything is available here in this so you just need to go through right so integration like I think unkip cover so all these things are related here then when to like what do you understand with call out what do you understand with web services so these are two different things that you need to know right then wsdl then how soap can be accessed then how to use external wsdl api so all these things are related to integration what is remote site setting then how soap and rest communicates then what are the methods and rest like http get, post readput then rest request consists which four components that you should know then what is json right so all these things you need to know so this was last slide right so I hope now you must be like aware like how you can prepare yourself for developer interview with the help of this document so let me try if I can share this document with you okay so maybe I will be sharing this link with you after this session right so that you will be having this document with you so again I am iterating this like I will be sharing this document in the telegram channel right I will be sharing this document in the telegram channel so I am sharing that telegram channel link here once again so that you can join so Manishankar basically we can perform batch epics at specified time with the help of schedule label epics so Sumit is saying there is no not this type of telegram group so I think of these links so I just pasted link one more time if you click on that link you will be able to otherwise like if you go to the description of this stream you will have all the links listed over there just just crawl a little bit you will find all the important links to follow okay so this was about I just wanted to share this document with you live so that you have like this kind of document exist and its PDF will be available in the telegram channel so those who want this just subscribe the telegram channel there you will be having all the details and still if you wanted without telegram channel so here if you go to study salesforce.com so under interview preparation you have this Q&A videos if you click on this link so here you will find all the PDF which I explained earlier right so these are the things which are already there okay yes so without certification also you can get a job but certification will add on some values and just to iterate again like I just launched the salesforce job readiness program so these are like limited seats paid programs so lots of folks are requesting like your free bootcamp is awesome we learned a lot but we need a mentor who can guide us on daily basis clear our doubts have a regular interaction so for them I created these two premium programs one is for admin app builder Q&A which will be for two months and another is for apex LWC integration and only studio which will run for four months so if you or anyone whom you know want to start their salesforce journey so ask them to register so they can just click on now and they will end up on this form they just need to fill their name and email address and my team will reach out to them and then they can join this premium forces and you can see like very very less amount as mentioned here so I just did some research and as per market standard these rates are very less and I myself will be dedicating six months for covering up these two sessions for the folks right so anybody if interested in this so ask them and if if they want self learning if you are committed to self learning you can mentor yourself then on left hand side you can see free session type words are also available so I am not removing all these free sessions they are still there anytime you can go through but if you are not a sales if you are not a self-study self-paced learning person then I think these premium boot camps will be worthy for you okay so with this note I think I just shared all the important insights with you so tomorrow I will be having one more sessions where I will share aura and LWC related question and answers will share the PDF as well right and then I will be having one last session of this boot camp that will be day 100 and in that day 100 I will be having one announcement so as you can see I updated the session tracker if you see the session tracker so I will be announcing one big giveaway in that day 100 so today we are doing day 98 then tomorrow I will be completing day 99 and then maybe on Saturday or Sunday we will be doing this day 100 right so just join that and it will be there we won't be talking about study it will be like interaction session with all the learners with me so I will be taking your feedbacks and will be announcing this giveaway will be sharing my journey as well why I started this boot camp and what is my vision or mission for the community so I received lots of appreciation, love following subscribers viewers through this boot camp and it gave me so much name and fame across the globe and I am very much happy and blessed all mighty gave me this opportunity so I am happy like I was able to share all the knowledge able to collect all the knowledge with my teaching and people are liking that and I was able to collect all the resources and which is available with you in this excel sheet and it will be available forever free of cost right so don't think like I am doing some paid sessions as well so I will be removing this so they are available with you forever anytime if anybody wants like self based learning they can go through all these things ok so with this note I take your leave for today will see you tomorrow with LWC related Q&A sessions ok thank you so much guys see you tomorrow bye everyone