 Hello, hi everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So, happy Monday. And you can see today we are going to start a new topic that is record triggered flow. And this is day 27 of Salesforce learning bootcamp. So almost one fourth part of the bootcamp is about to complete this week. And like you can consider almost all admin and I consider flow and development. So all admin related stuff will be completed. And from next week, I will be starting apex programming for which lots of folks are waiting. So from 20 March, it will be starting. And today we will discuss about record triggered flow. And this is part one. So I think total three sessions I will be doing on record triggered flow so that all the different scenarios I will be covering. And I hope you have done all the screen flow related scenarios and you understood it very well, because I gave you some self practice exercise as well, and provided you reference videos. So those who are doing practice for the first time for flows, so just try to implement all the scenarios so that you can understand them clearly. Okay. So once again, hello, and welcome to everyone. Okay, so let's start today's session. So those who just joined this session today only and want to know about me so all these are my information. Then I hope you all are following all the virtual learning best practice because I hope till now you have recognized like all the sessions are connected. So you can see today we are doing part one of record triggered flow. And if you want to understand tomorrow's session, so today's session is very much important. So this way try to attend all the sessions. If you are not able to attend life, so recordings are available for all the sessions. So do watch them and also try to implement the exercises. So today also first I will complete all the explanation and demonstration. And then in last I will be doing all the question and answers. Right. And I'm happy like people are like utilizing comment section of YouTube and telegram group as well. So telegram is the most busy group where people are asking questions and like those who are doing the answer, they are helping each other. So I just say it like it is a self help group. Okay, it is not a telegram group. It is a self help group to learn Salesforce. So it will help you like months and years because when you will be working on projects. So there you will find lots of questions. So you can take help from anyone from that group. Those are active. And this is the Salesforce development bootcamp timeline. So it is updated now. We are in week eight. And this week I will be completing all the flow related stuff. And then from next week I will be starting Apex. And like people are requesting, please start Apex for beginner, those who don't know programming so that they can also understand. So I will try to create the sessions in such a way so that if you have very basic or no knowledge of programming, then also you will be able to understand the concepts. So maybe I will update this timeline accordingly because in that case, I don't think Apex will be completed in one week. So I will be modifying this timeline and Apex may go for two weeks. Okay, so accordingly, I will update it. And if you have not shared this channel with folks who want to learn development, so please do. And as I announced in last session on Friday, like soon you will hear like I will be launching first bootcamp that other than this. So it will be more related to cybersecurity stream. Okay, so I just aligned someone for you so that he will be teaching you freely all the concepts related to cybersecurity. So keep an eye on that as well. So I will be sharing that information soon. Okay, so let's start understanding record triggered flow scenario. Okay, so if I compare screen flow and record triggered flow, so screen flow is basically used so that we can place a UI on front end. And with that UI, we can interact and provide some information and basis on that some action will be performed in the background. But in case of record triggered flow, everything happens in the background. You just need to create new record or maybe updating existing record or maybe deleting existing record. So if you perform any activity related to any record, so if you want to run a process in the background, once you perform that activity on record, so there are total three activities, record creation, record updation and record deletion. So if you perform anyone from these three activities, then record triggered flow will be executed or initiated automatically, right? And you might have heard about workflow rules and process builders are deprecated. So the replacement of workflow rule and process builder is record triggered flow. Whatever you can do through workflow rule and process builder, everything you will be able to do from record triggered flow. Okay, so from now onwards, like you will be having enough knowledge about record triggered flow. So if in your or you have option to create workflow rule or process builder, still you will be going for record triggered flow implementation. Okay, so here I just listed out three scenarios that I'm going to implement in today's session. And with the help of these three different scenarios, we'll try to understand like how we can implement record triggered flow in Salesforce. Okay, so first scenario says on account creation, if industry is equals to media, then we need to automatically populate rating as hot. Okay, so what will happen if you are trying to create new account record? And you just populated industry that is equals to media, you have not provided any value in the rating field. So you just need to populate that value automatically through some automation. So that you can do with the help of record triggered flow. Okay, so first of all, I'm going to implement this and then we'll see another scenarios as well. So jumping to the org here, you can see flow is already searched. If you want to search for flows, so you can search flows here and this option will be available. And here now we will be using this new flow. And in case of record triggered flow, this button is also useful flow trigger explorer. So as per best practice, we can create one flow on a particular object. But if you have more than one flows available on particular object, and if you want to maintain the order of their execution, so that you can decide with the help of this flow trigger explorer. Okay, so first we'll be creating few flows and then we'll see like how this flow trigger explorer works. So I'm clicking on new flow so that a UI will be available so that we can select particular flow. So here you can see we have this option record triggered flow. And if I select this, so you will see the UI how we will be able to create it. So basically, whenever I selected record triggered flow, so automatically it is asking you to select particular object. So always remember, screen flow and record trigger flow both are different. Screen flow is not related to particular object. It is like unique. It is not specific to particular object. It is you can say generic flow. But if you are implementing any record trigger flow, so record triggered flows are specific to particular object. Okay, so in our requirement, it is saying on account creation, it means here which object you will be selecting account. Okay, so here you can read select the object whose record trigger whose records trigger the flow when they are created, updated or deleted. Okay, so three operations if you do on particular record, then record triggered flow will be initiated automatically. So first of all, you need to select the object for which it will be running. Then we have configuration options. So trigger the flow when so here four options are available. And I think by these names you can identify and as per the requirement you can select. So for creation first for updation only second for creation as well as updation. If you do any operation from these two, so you can go for third option. And if we have a deletion, then you can go with fourth option. Okay, now if we compare trigger with record triggered flow, so trigger is basically custom implementation. If you talk about trigger, so trigger is implemented with the help of apex. Okay, so here in case of trigger, you need to write all the code. But in case of record triggered flow, you don't need to write any line of code, everything you need to do through point and click. Okay. Now here we can set the entry condition as well. So if you want to provide any entry criteria, then you can just set it. So here I am writing. Okay, one more thing that you need to understand. So if you remember, like whenever we created screen flow, so we used to place that screen flow on the record page. And whenever we use to place that screen flow on the record page, so we used to receive the ID of that particular record in the record ID variable. And in all the screen flows, we manually created that record ID variable, right? But in case of record triggered flow, if you have created any new account, so that new account information will be available in a global variable that is known as Okay, here it is not available. So that is basically known as dollar record. So I'm not applying condition here, because that information is not available here right now. So let me search that again. Okay, dollar record is basically not available here. Here you can just directly search for the field and inside the flow, you will be having that so I will show you inside the flow like how you can receive the values through that global variable. So here you can write the field API is directly if it is equals to media, then only it will move forward. Now, here we have two options optimize the flow for right. So those who got confused like what is dollar record? So don't worry, when this option will be completed, so I will be implementing one more element. So there I will explain you again, what is the use of dollar record global variable. So here I have not used that right, I will be using and will be explaining it again. Before moving forward here, you can see two options are also available. So these are very simple. You can also say a fast field updates is basically related to before the record is saved to the database. So basically whenever we create update or delete any record, so that change actually happens in the database. So if you want to perform any more changes, like suppose from UI, you created a account record, right? And after creation of that record, when it is being saved to the database in between if you want to do some operation, like record creation and database save in between if you want to perform any operation, so that you can do with the help of flow. And for that, you just need to select fast field updates. So it says update fields on the record that triggers the flow to run, right? And this high performance flow runs before the record is saved to the database, right? So if account is created and on that account record through which this flow will be triggered, if you want to do some modification, some changes, then you can select fast field update. Okay? Whereas if we go with second option actions and related record, so it says update any record and perform actions, like send an email, this more flexible flow runs after the record is saved to the database, right? So for example, if I create if I'm creating account record, and I want to do something with contact opportunity or cases, or if I want to perform some action like sending email, sending notification, post to chatter, if I want to do those kind of stuff, then I will be selecting the second option. Okay? So simply how you can remember this, if you want to do something on the same record through which flow is triggered, go with fast field update. If you want to do something with the related record, then go with this actions and related record. Okay? And if you want to run our seamlessly, so here, you can see an option is available, like include a run asynchronously path to access an external system after the original transaction for the triggering record is successfully committed. So basically, we have two types of path. One is synchronous. One is a synchronous. So synchronous path basically executes immediately. And if you want to run some process in the background at later stage, so you can just check this checkbox and it will be including a asynchronous path as well. Okay, so I am not checking this as of now because we are not going to create any asynchronous path. We will be doing the operation synchronously. So here I'm clicking on done. Okay, so you can see here automatically, both the parts are available run immediately and run asynchronously. Right? So right now, we will be implementing code on this path only. Right? And if I show you this, so basically flow builder is somehow same as we saw in the screen flow. So here you can see we have this toolbox. If you toggle this button, it will be available or it will be disabled. If you want to select element, then these are this option is available then undo redo and then this is setting. And on top right corner, you can see there are lots of buttons run debug we already used activate, we already use save as save our same. Here we have view test as well. So if you want to create some test cases for record triggered flow, so you can create them as well. Okay, now otherwise what you can do here, you can implement the operations. Now what we need to do here, we have the options like if you're creating a count record and through which this flow will be triggered. So here we have option update triggering record and actually we need to do that. So you can just click on it and here you can see this option is available. Okay, so here you can see I'm writing update account. And here we have four options. So first is by default selected that is use the account record that triggered the flow. Okay. Now here also we have this filter condition. So if in the beginning, if in the beginning you have not set the entry criteria. So here also you can set the criteria. Okay, how we can do that. So here you need to search for the field industry. And if it is equals to media, so you will be selecting and here you will be selecting the rating and rating you can set as hot. Okay, so dollar record is basically not used in this flow and it will be used in the next scenario that I'm going to show you, right? So here without dollar record global variable, we are able to access the fields. Okay, so just forget about that and in the upcoming scenario, I will be implementing that. Okay, so this way, like if industry is equals to media, then only rating will be set as hot. Otherwise, this operation won't be performed. So this way you can just implement it and then click on done. So here we have this update account element available. Now what you can do just click on save. Here you need to write the label of the flow. So this way I'm just saving it so that I can remember like it is working before save or after save and rtf means record triggered flow on account. So you can have any naming convention, whatever goes with your project in which you are working and now I'm just clicking on save. Okay, so here it is showing some warning. So for a flow that contains scheduled path, specify a default workflow user in your or process automation setting in the user who triggered the flow to run is no longer active. The default workflow user is associated with the flow actions, right? So what we need to do here, you need to search for process automation settings. And if you open this process automation settings, so here basically you need to select a default user. Okay, so I just selected a default user and I'm clicking on save. And here you can see this warning if the user who initiated this path and if that user record is not active. So whatever user we selected there in automation setting, so that will be associated with that flow action, right? Now if I refresh, so I think this warning will go on and yeah, now warning is not available. So here you can see we have both the parts and why it is giving schedule path. So I'm just clicking on edit. Okay, so yeah, this run immediately and run asynchronously both are counted here, but in run asynchronously, we didn't define anything, but still it is counting two parts here if we open. So we have one condition and now I'm clicking on done. Okay, so yeah, so thank you for letting me know by mistake. I just selected it. That's why that is available. Yeah, I was wondering why that is available because I think I unchecked it, but now you can see that path is gone. If you want to add it. So what you can do you can just check this checkbox and it will be available. Okay, so now it is like created. Now I'm going to save as and now I'm activating it. Okay, so now if you want to test it, so go to accounts and here you can create a new account. So I'm creating one account and I will be filling the industry industry. I'm selecting as media and rating is not available on this page layout. So I think we need to modify this. So I'm just clicking on save. Okay, here validation rule is available active. Okay, let me just modify this page layout first. I think for some requirement we modified it. Now we need to place some fields on the page layout so that it work properly. So I'm just going to modify the page layout and I think everybody knows how to modify the page layout. But here we have all these. I think okay, so let me just check why it is not showing all the fields. Sorry, I just need to open a record and okay, actually we just created this dynamic form and if we create a dynamic form so this detailed page is basically overwritten by this dynamic form. So that's why you can see in this dynamic form, those rating and active fields are not available. So what we need to do, we just need to remove this dynamic form. So I'm going to remove it for one of the demo I just created this dynamic form and that is working right now. So if you have this situation, so just remember this. So I am going to delete it, saving it, moving back and in real time projects, if this is the requirement like you, anyhow you need to use dynamic form. So whatever fields are required, you will be placing them on the dynamic form, right? You won't be deleting it. So I just deleted because I just wanted to save my time because page layout is already there. Okay, so I'm just filling this information, then industry I'm selecting as media and active I'm selecting as yes and here you can see rating I'm leaving as none. Now I'm just clicking on save. So record is being created and if I go to details so here you can see rating is populated as hot automatically because our industry is equals to media. So this way if you want to create any record flow that runs before your record is saved to the database. So this is a small demonstration of that flow, right? So I will be taking all the questions at the end because few folks are commenting like it just breaks the flow of the session. So I'm going to explain all the scenarios first and then I will be taking all the questions, right? So just have patience till I reaches to Q&A session. Okay, so I hope you understood the use of before save and now I'm going to pick second one. So here also you can see whenever a record is created. So upon creation of account, we need to create a related opportunity automatically. So here we have two requirements. First is having there is no criteria like whenever you are creating an account every time opportunity should be created related to that account. Then after creation of this we need to modify the same flow and we need to add a criteria if active is equals to yes on account then only new opportunity should be created. Right? So these these are two requirements, okay? And I'm going to implement it. So maybe I will be merging it like when I will be creating account records. So I will keep active equals to yes and I will show you like if you don't provide any criteria so how you can implement your flow. So if I come here, so I'm just going to create new flow. So under home setup I am going to search for flows and I will be creating new flow and after creation of this flow, maybe I will show you this record triggered explorer as well. So I'm just opening it right now so that you can see one item is available here. One item is available here and if I create one more flow so that will also be available there and I think it is coming under this option actions and related record. So let me see why it is coming there. Yeah, because I just selected this option so I'm just updating it for fast field update. So actually in case of before save like if you want to perform that operation so you need to select it by mistake I selected actions and related record. So I'm just selecting it clicking on done clicking on save as save and activate right. So I just explained that later. So I just selected that option now I just modified it if I go here and refresh so you will see the change that flow will available under fast field update. So this way this record triggered flow sorry record trigger explorer is helpful. It will give list of all available flows whatever you implemented and if you want to change the order so here added order button is available and if you want to create new flow so that button is also available. Okay, so it is very helpful and from here you can select particular account sorry particular object and from here you can select the action record is created updated or deleted. Okay, so we'll see it later on again and I'm going to create new flow now. So I'm selecting record trigger flow again. Okay, so so like I can see a few questions I just selected I just saw this chat right now and I think I modified this. So now if I select this option and still I create new record so same operation will be happening. Okay, so you can just test it whenever you will be implementing. So by mistake I selected second option because I just explained that and I didn't notice that is selected. So now if I create one more flow so here also I am selecting account then record is created then this time we will be selecting this option. Okay, and in the requirement you can say like we have no criteria if no criteria you want so don't select anything here right you don't need to select any condition just leave it as none okay and if you want to apply a condition so what you can do just select it and here you will be writing active equals yes so this way you can apply condition right so in our org we have a validation like while creating account record so active should be populated so that's why if we leave it blank so we won't be able to create the record so anyhow it will be like active you need to provide as yes if you leave it blank still it will be working okay so let's put it none as of now later on we will be modifying it and I am selecting actions and related record because on creation of account I need to create a related opportunity so I am just clicking on done now here you can see only one path is available because I just didn't check that checkbox as in Cronus path now here we don't need to provide any screens and screen option is also not available right now what we need to do we need to create a record and we need to create opportunity record related to that account okay so here you can see these options are same which we used in screen flow how many records to create how to set the record field so one record we need to create and we need to use separate resources and literal values and here I am going to select opportunity because I need to create opportunity record okay and here we need to set opportunity name right now like I in previous example I told you we have a global variable that is known as dollar record so here you can see it is available so whenever you will be creating any new account record whenever you will be creating any new account record and you want to create a new opportunity related to that account automatically so the newly created account record information will be available in this dollar record automatically right so you don't need to create any record ID variable that account information will be available here and from here I am just setting the account name into opportunity name so what my requirement is whatever account name will be the same name will be for opportunity right because here we cannot receive any information from the user because it will be running in the background automatically okay now here we need to provide close date so for close date now I am going to create a formula so I will be creating a resource so here you can see we have new resource and this we used earlier as well variable now we use text template as well now I am going to use formula so formula today's today date then here I am selecting date now from here you can insert a function so here date function is available or maybe you can just select today today will return the current date so here it will be available like this so this way if you want to create any formula variable in the flow so you can and just click on done so that will be available here right then you can add field and here you need to set the stage so stage you can select from here and if you want to link this newly created opportunity with the account so what we can do you can just set dollar record dot ID so dollar record will be containing all the account related information so through that we are just fetching ID of account so that account ID will go to this account ID okay so this way the newly created opportunity will be connected to that account automatically now I am just clicking on done so this way record triggered flow is created and here you can see we don't have any right entry criteria so every time whenever you will be creating any account so opportunity will be created so I am just saving it so create opportunity on account then just click on save and activate so if I refresh it here so now you will see two flows one is available under fast field updates and one is available under actions and related record right and if you click on edit order so right now we have only one so through this you will be able to change the order of the flows right and here we have versions also like which version is latest and active so this way you can use this flow trigger explorer now it is active so if I go to account so previously I created account record and it is not having any related opportunity okay so now we will try to test both the flows together so I am going to create one account acc 301 and here I am placing industry as media right and active also we need to provide so I am providing active as no still you will see opportunity will be created so I am just clicking on save so if I go to detail so here you can see rating is hot so that flow is working first flow and if I go to related list so here you can see opportunity is also created so it is having the same name which is of account account name is acc 301 and opportunity name is also same stages prospecting close date is today's date so if you want to open this opportunity record you can and under the details you will be able to test everything right and if we create any account record and if we populate active as yes then also opportunity will be created because in our flow we have not applied any entry criteria now what we'll do in this case if you want to apply the entry criteria so you can just add this active equals to yes so if you go here so open it and here you can apply the condition so active then equals yes so now whenever active field value will be yes then only it will be created okay so again I am clicking on save as and clicking on save and I am activating it so now whenever I will be creating any account record and if it is having active as yes so opportunity will be created and this time you can see industry I am leaving as blank and active I am selecting as yes clicking on save so you can see opportunity is created if we go to details so rating is blank because we didn't populate industry as media okay and if I create one more account and if I provide active as no and click on save so I didn't provide industry I didn't provide active as yes so you can see opportunity is not created and rating is blank okay so this way whenever you implement any record triggered flow so you need to test all possible scenarios by filling the value what is happening by not filling the value what is happening by filling the different value what is happening okay so in all the scenarios you just need to test whether your record triggered flow that you have implemented is working fine or not okay so I hope you guys understood differences between both okay now let's take some questions because now you have idea of both before save and after save and you are able to compare them so now I am going to take some questions so trigger versus record triggered flow I already explained so Amir is asking can we do flow practice in recruiting app yes so now like whatever I am updating in the project so you can do that at your own because after doing some development related stuff like apex and trigger so together I will be again doing some sessions on that project right so I will be dedicating one week where we will be implementing some flows apex and trigger whatever we will be understanding right if you want to go ahead you can so next question is as we can create multiple flow on one object is it okay to create multiple flows or else any best practices like trigger so here like if you want to create multiple flows that will work because we have flow trigger explorer so trigger basically we can manage the order of execution through trigger like if you create trigger handler apex class so you can call methods in particular order so for that purpose here you can see we have this flow trigger explorer so even if you have different different flows on different objects so you can just guarantee the order of execution right so sales force itself suggesting like you can create multiple flows that's why this flow trigger explorer is available okay so like you can try to create one flow that will complete as many requirements as we can like here in this scenario what we can do we can merge these two flows as well we can merge these two flows as well like right but knowingly I explained them with different scenarios because I just wanted to compare before save and after save if you combine so anyhow we will be selecting after save right so it depends on the business requirement like how many requirements are there and will you be able to merge those flows or not right if you merge lots of flow so your process will be complicated so that's why if you want to keep them simple so you can implement different flows as well so Gayathri is asking about triggers so Gayathri just wait for apex and trigger related sessions so I think when I will be explaining them practically so you will be able to understand that more easily so Mukda is asking what is the use of include a run asynchronously path so here in this flow you can see we have two paths if I enable it if I enable this check box so you will be having two path one is immediately and one is asynchronously so immediately means whenever you create any record so this path will be running immediately means if this path is not executed your record won't be committed successfully in the org right that is the meaning of immediate asynchronous means your record will be committed to the database and like asynchronous path will be running at later stage whenever some resources are available okay so this is the difference between immediate and asynchronous so in immediate if the process is completed then only your record will be committed to the org and in asynchronous like your process can run at later stage as well so basically for integration or calling of API we use asynchronous path right so I hope you understood this yes so jeet so optimize the flow for is related to that before and after trigger that we use in apex so vamshi is asking why condition exists twice in this so in previous flow I just implemented condition twice I implemented that for explanation purpose only if you click on none you can remove it from here and you can keep it here right and you can do vice versa as well you can select none from here and you can just select the condition in the entry criteria right okay so puja, amit, archana I think I just corrected my mistake so I am going to take more questions so ketan I hope your doubt is also cleared I just by mistake selected that option Mukda is asking can we bypass the validation rule using the screen flow so yeah we can try so I just created one video on that but it is somewhere with process builder so if you go to administrator and process builder on this website so here you will find one video bypass validation rule through process builder so if you go through this video so just try to recreate this in flow builder and see whether you will be able to bypass a validation rule through flow or not right so I hope this example will help you to understand that scenario so when I think I also answered your question we can combine both the flows in single flow and in that case we will be selecting actions and related record option in the beginning okay so Tanmay saying he has some query related to telegram and he posted that in the telegram group so let me quickly check it so I think you posted some very large message if I recall okay so maybe after this session I will pick that because it is not related to this session so your question is very handy so it will take some time so first let me focus on record triggered part and then we will discuss that so there is next question what is difference between process and flow so process is basically related to process builder and flow is like flow builder yes Archana record trigger flow is triggered on data import as well so if you don't want to trigger that you can deactivate it how you can deactivate so just go and here you will see type process type so we created record triggered flow right now and here it is so here you can see process type is auto launch flow but it is record triggered flow and if you click on extreme right and click on view details and what's on so here you will find all the information so from here you can deactivate and then you can just do the data load so sonu I didn't get your question can you please elaborate more yes Praveen so what will happen if you provide industry as media and second flow if second flow is having condition like active should be yes if that is also populated so opportunity will be created so if you create both the flows then both flow will be working okay so Badal is asking please explain global variables so if I go to the flow again so Badal just focus on this like here what I did I just assigned the account name into opportunity name so from where I can get the account name account name of the record that I just created and through the creation of that account record this flow will be executing so the newly created account record information will be available in this dollar record global variable right so in screen flow if you remember we created record ID variable but here we have this dollar record global variable so whenever you create update or delete any record and if any flow is working on that operation so that flow will be having all the data in this dollar record global variable so Amit is asking how did the flow work even though you used after trigger wasn't a supposed act after committed not committed to database commit and save both are different options right so whenever we are creating any record so first it will save to the database right save means not commit same means it is temporarily saved in in the did saved in the database right so if you are creating any record and it is temporarily saving in the database then that duration if you want to perform any operation so that is known as before save if record is saved in the database and next phase will be committed to the database so save and commit in between that if you want to do some modification in the in the record so that we do through after safe right so save and commit both are different save means it is temporarily saved commit means it is permanently available in the org right so I hope now it makes sense and whatever process you are doing in before save so by mistake I selected after save option so it will be working same but there is one concept which is like DML so whenever we use after save so one DML is performed and if we use in like that is if you want to modify the same record and if we select before save so DML operation won't be performed so actually when we will be discussing about triggers custom code then you will be actually understanding the difference between before save and after save right so right now you can just consider if you want to do something with the current record through which your record is triggered so go for before save and if you want to do something with the related record then go with after save and here before save means fast field update that is available here so let me just show you that option again so this fast field update is basically before save and action and related record is basically after save okay so Keshav is asking for schedule triggered flow so that I will be covering in the upcoming sessions so right now I cannot sorry for that so Archana in flow we don't have undelete option as of now so if you want to perform any operation on undelete so trigger is the only option for that okay Mukda is asking what is the use of global constant empty string so here like if you want to compare this with that empty string so you can search it is a global variable which is representing not null so if active is equals to not null so if you want to compare something with not null so you can just write empty string here okay so Yaram is asking this link of study Salesforce so I am just sending it for you so what is the difference between record triggered orchestration versus flow explorer okay so first flow explorer is very simple it is basically showing you all the flows that you have created so it is showing you all the flows that you have created and if you want to change their order of execution so you can right and flow orchestration is basically new feature and like I am also practicing that and if I am able to implement some proper scenarios so in this week I will be explaining you that as well so right now I cannot explain that record trigger orchestration but flow explorer I think you are able to understand difference we will be seeing when we will be discussing about that feature yes Kirinath we can update child to parent we can do parent to child update as well so all those operations we can do yes or no fast field updates is like a before event that we have in trigger yes Mukda I am just learning that because orchestration is the new feature so I am sure I will be understanding and will be able to explain you no worries on that so tomorrow I have some bandwidth available with my day so I have to create best practices as well I have to create that orchestration scenario as well so we will do that ok so let's understand one more scenario now so someone asked me like can we do parent to child field update or child to parent field update so now I am going to show you that yes Keshav time based session will be doing schedule triggered flow will be there ok so just read this requirement carefully so last statement says when a contact is created then we need to update the total contact field on account using record triggered flow so as you know account and contact basically shares a spatial relationship that is not actually master detail relationship right so roll up summary we cannot create on account if we want to count total number of contacts right so what my requirement is I just need to know how many contacts are created on account related to account so whenever a new contact is being created I just want to add one into the related accounts total contact field right so ok so I think there was some internet issue that's why connection was broken now you are able to listen me properly and for few minutes you won't be able to see me because I just want you to read the complete statement that is displayed here on the screen so the requirement is when a contact is created then we need to update total contact field on account using record triggered flow so basically we need to create this total contact field first on account and then whenever we will be creating account sorry whenever we will be creating any contact related to particular account so we just need to add one into that total contact field right and just let me know if you are able to listen me now ok thank you Manisha for confirmation I think there was some internet glitch now it is fixed so I hope now you just gone through this question now I am going to implement this scenario for you right so jumping to the flow and now I am going to create new flow for you and before creation of that flow before creation of that flow let me just create a field so I am going to object manager and searching for account and under account I am going to select fields and relationships just a second ok so here I am going to select fields and relationships and I am going to click on new so that I can create a new field named as a total contact so it will be of type number it will be of type number and I am just clicking on next and here I am writing total contacts and here I am setting default value as 0 so this is important right so this is very much important those who are watching this live make sure default value will be 0 if you are like watching it later just focus default value you need to set at 0 because in flow we will be fetching this value and we will be adding plus 1 into it right so it should be set as 0 initially and later on we will be updating this value with the help of flow ok now I am just clicking on next visible to all the profiles again I am clicking on next and save so this way on account object I just created total contacts field so this field will be available on the UI and its default value is 0 so let's go to an account and refresh it if I go to details so here we will be having that field so I am again refreshing it so that we can check the field value ok right now it is not visible here so let me just create a new account so here you can see while creating new account this total contact is basically 0 right now if you want to create any contact related to that account so through flow we just need to update this value ok so let's create a flow and then we will be testing it so this time the new flow that I am going to create will be record triggered flow and object will be contact this is important object will be contact why so because here you can see in the beginning it is mentioned when a contact is created so if contact is created then you need to update the total contact field on account right so here contact and a record is created then here you can apply a condition like if you are creating any contact and if account id is null false so this false is a global constant so if account id is null false means account id is not null account id is having any account id populated so what does it mean the contact which you are creating is basically related to an account so if contact is related to any account then only you want to perform this action through flow otherwise not so chandan is asking is this scenario is child to parent so I would say yes so we are creating child record and through that we are going to update parent record and tomorrow I will be showing you some scenarios where we will be doing parent to child update as well ok so this is child to parent field update and here we will be selecting actions and related records because two objects are involved in this operation and then click on done right now what we need to do here I am just going to get the record so first I am going to get the account data so that I can have that total contact field then I will be adding plus 1 into it and then I will be updating the same account so here I am writing account so I am going to get the account information now which account whose id is equals to now we will be using that global variable dollar record so you know this flow will be working whenever a account sorry whenever a contact is created so the newly created contact information will be available in this dollar record so I just clicked on it and here it will be having account id related right because if you are creating any contact and if that contact is related to that account then only it will be working that we set as entry criteria so if that entry criteria is fulfilled it means record is related to that account so that account id we are matching and here you can see we have only the first record and automatically store all fields so for the first time we are using this get record in screen flow we didn't use it but in this record triggered flow we are using it similarly if you have any requirement of using get record in the flow screen flow so similarly you will be using it okay now I am clicking on done so whatever account I am getting that account information will be available into this get account API name all the account related information will be available into this get account now what I am going to do I am going to create a resource its name I am writing as counter data type will be number and done now here I am going to pick an assignment and increase counter so here counter equals get account dot total contacts right and then counter add one so this way it will be added or another way you can create a formula as well so in that formula what you can do you can just use it and you can add plus one so this way I just increased counter value now let me show you how we can create formula and then we can use anything so formula I am going to explain you for understanding purpose so naming it as counter formula and data type will be number and here we need to insert the resource so get so this is get account and I am just fetching total contacts so it will be available and then I am adding plus one so either I can use this counter formula or I can just use that counter variable so we have both the options right so now here I am going to select one more element so this time I am going to use this update record so update account now here I am going to select this option no last option so here I am selecting account then again we need to check the ID so if account ID is equals to dollar record dot account ID so dollar record means child that is contact if contact account ID is equals to particular account ID then what we need to do we need to update this total contact with a value so we have two counters one is this counter variable that we incremented using assignment we have this formula as well so you can use anyone for demonstration purpose I just created both right for demonstration purpose I just created both but you can use anyone so I am just using this counter and clicking on done so this way it is created now just click on save so I am saving it as total contacts on account and clicking on save then I am going to activate it ok if you want to debug so that is also possible so this is little bit different from screen flow so here you just need to select the contact record that you want to debug and if you click on run so all the debug information will be available here you can just expand all and everything will be available together so here you can see like counter will be receiving the value it will be adding one and then that will be stored into that total contacts so step by step you will be able to see all the debug related information right and here you can see so because the flow ran in rollback mode any changes to add delete or modify records were rolled back so whenever you debug any record triggered flow so your org data will be intact it won't get changed but in screen flow if you debug so it will be updated ok so this way you will see the debug information and sometimes your flow fails and if it is failing so here you will see all the information so you need to debug and check it appropriately now if I go here and open any of the account so here we just need to check whether that field is available or not total contacts ok it is not there so I am just creating new account so total contacts 0 ok active should be having some value so I am checking yes save so one opportunity will be created details you can see total contact is 0 now if I go to related and click on new and try to create new contact so I am creating test flow and clicking on save so contact is created related to this account if I go to details so here you can see total contacts is 1 so if this way if you create more contacts one by one so automatically this counter variable will be incremented every time right so this way if you want to perform child to parent field update so this was the scenario that I demonstrated right now if you go to flow explorer so here still you will be able to see two flows now if you change the object to contact so you will see one flow related to that right so this way you can select particular object and you will be able to see how many flows are created for that and this is for record triggered flow only right so I hope you understood this and just implement all these flows in your org and if I take you to the exercise so I just added a few examples there so whatever I explained is available in the demo live session link is available here as well if you want to see it later on and these two you need to implement at your own so number three and number four are similar to number two right so just try to implement them and like okay so here I just need to update when opportunity is created and when case is created right so this is the updation so two different flows you need to create one for opportunity and one for case right so this is your today's assignment that you need to do and tomorrow also we will be doing record triggered flow so I will be preparing different scenarios for that and those you will be able to implement okay so this is all about today's session now if you have any question you can just throw them to me and if you understood everything want to leave so you can and tomorrow also we will be understanding record triggered flow so what is the difference between get record so get record means you are getting the existing record and dollar record means dollar record is having the information of the record through which your flow is triggered so through get record I am getting account that is existing account but dollar record is giving me the contact information that I just created yes both are storing their record information but different get record will give you the existing one and dollar record will give you the current one yeah so Shesha Kumar asking a good question so if we go to the flow so there we have two account IDs if I go here and if I remove it and select record dot account so we have two account IDs so this second option will give you the ID only right but like you want some other field of that account parent account so you can just click on the first one and you will see these options so if you want to select account and then active field so this way you can move so contact and on contact we have account ID through account we want to get active field value so this way you can utilize that option okay so I am just cancelling it so that it won't apply so when I account and contact doesn't share master relationship so we cannot create roll up summary field there okay so next question is Akash is asking sir how do I practice for admin search just go through day 26 session I just explained you can utilize the trailhead functionality and all the day-wise exercise project if you do so you will be able to prepare for admin certification so with firu's text template I think I already explained in one of the session that I did for screen flow and stays I also never used in any of the scenario so maybe I don't know the exact use but I will try to figure it out maybe tomorrow and day after tomorrow I will try to explain yes Vijay daily session will be the same time so it is 8.30 pm IST yes Tanmay I will pick that question just let me complete other questions first yes Archana so governor limits will be same that we have when we implement the custom code right so whenever you implement any custom code whatever limits you have there so same limit we have while working with the trigger yes Sonu we can do that in that case you need to create one flow on deletion but I think on deletion we don't have that option let me just check if you select that option like if we create a new flow if we create a new flow and select delete so here you can see before the record is delete option is available after delete is not available as of now so that option you won't be able to do for that you need to take help of trigger asking in record trigger flow can we create roll up summary field so not exactly like on creation you can just do some calculation on updation and deletion as well but not exactly roll up we can create because in deletion we have only before save we don't have after save so for create an update we can do but for delete we cannot for under it as well yes Vinayak we can have decision element so tomorrow I will be showing you some scenarios where in record trigger flow we will be using decision elements as well thank you Shesha and this I am doing from January I hope you joined in the middle but I appreciate your time as well and we will learn development related sessions all together and please share the information with your friends as well so that they can also join and I am doing all the session in such detail so that everything you will be able to discuss I don't think anyone in this ecosystem is doing this so this I am doing because I have a passion for teaching and helping people yes Vijay I am in discussion with a consultant who is preparing some content on integration so he will be delivering those sessions for you and those session I have planned after apex and trigger because that is a prerequisite for integration so Sheetal you are asking if we added parent case to child case I didn't get this can you type it completely Supraja I think admin project implementation we already did and deployment yeah I will be having separate sessions for DevOps like how we do deployments so after this development related stuff we will be doing deployment related sessions thank you Samir yeah so I just planned all the sessions in such a way so that after the session you get plenty of time so that we can do question and answers because in many of the webinars like session is delivered but there is no Q&A available which will answer each and every question so here in each and every session I am trying to answer all the questions so Sheetal is asking if we added parent case to child case then if I remove any case then at that time counter will get degrees same we do we can do it for contact yeah no we cannot because I just showed you on delete we have only before if we select a record is deleted so we have before the record is deleted we don't have after so the actual roll up somebody if you want to implement so for that you will be utilizing the functionality of trigger so Gayatri is asking can we make a phone call so not a phone call we can send outbound messages as well similar to text messages when we use counter variable we want to know total amount of something so I think umka this is not a question you just wanted to clarify so Bindu is asking sir can you please include scenario created a record using flow with approval process so I think we can call approval process upon creation or updation of any record if you are creating or updating a record then you can call approval process that we can do right so if you have created approval process that we implemented in the project so that you can call through flow so I think we created one approval process on opportunity so maybe you can call that so if you come here and select for opportunity let's say created or updated click on done then from here if okay no if you click on plus and go for action and here if you search for approval submit for approval so here you just need to pass the approval process name or ID and record ID for which you want to run the approval process so this is the action that you can use okay yes Arjuna when integration sessions will be there so I won't be doing any session so it will be for maybe one week or two weeks so it will be embedded between this bootcamp so I will be preparing some stuff for you for later sessions and that I hope will be doing the sessions so no worries I will take care of that once integration will be done so that admin project I already modified it will be having all the development related stuff so I already modified it to have flow related questions if I show you the admin project so I just updated it you can see lightning flow questions are already there after the approval process so you can just start implementing this so a complete screen flow scenario is there then today we gone through record trigger flow so you can just start implementing these as well right so I will be updating this later on once this week will be completed so maybe some more flow related scenarios I will be adding into it yes of course we can call epics lesson record triggered flow so if you want to see that scenario just go here on study Salesforce scenarios flow builder so here I think you will find one scenario like how we can call epics so just search for epics so here we have call epics invokeable method through stream flow call epics invokeable method through record trigger flow and call auto launch flow through epics so three scenarios are there for three different flows you can just run so some me like if you don't want to implement custom code you can go with flow but in flow we have some limitations like after delete is not available and delete is not available so as per the requirement if you are able to implement the solution with flow so just pick the flow first and if it is not implemented properly then you can go with the trigger yes umka we can send emails and alerts similar to screen flow that is exactly same okay so if you have more questions please ask otherwise I will be ending the session so I think today's session was very interesting lots of different questions were there and I just answered each and every question so yeah for complex process I think you can go with trigger but in trigger basically if you implement the solution so you need to implement the test classes as well but in flow you don't need to write any test class but if you want to implement complex flow then you can prefer trigger but if you are good with flows you can implement complex process in flow as well so Satyam those notes I won't be providing but other material like whatever this is available on this website it is available as studysalesforce.com and all these links like day wise exercise project all these links session tracker everything is available in the description of this video so if you go to description you will find all the links there so Afkan I already showed you like if you if you go through the recording of this like call epics invocable method through record trigger flow because in sessions like I won't be able to explain each and every concepts so I will be picking these when epics will be explained so if you already know how epics works so you can just go through with them so Sameer if CPU time limit exceeds so you just need to modify the process because if time limit is exceeding your process will fail so you just need to reduce the complexity of the flow so Bindu how to create record only when we got approved from approval process so if on your record like once you your approval process is approving any record and on record if you are updating some field so on that field update you can call the flow that can be done okay Bhanushree decision element is having only one path so are you able to create multiple paths if you are able to create multiple path and still one path is running it means you have not implemented it correctly so you can just ask this in our telegram group you can just send a screenshot and you can ask yes Rekha we can use sub flow and if you have created any auto launch flow then you can use that as a sub flow so I think here you can find that as well so here you can see number 66 call auto launch flow through record triggered flow so this is an example of sub flow okay now I am going to explain the scenario that Tanmay pasted in the telegram group so it is like in this scenario we had selected the default value of the counter as one so always the user has to supply the value of how many records you want to create as greater than or equal to the counter value that is one in our scenario so if any of the user tries to supply the value of this field as zero then the record is not that is right if you enter zero no record will be created because here inside our flow the condition of the counter are going to be filled then in that case if I want to apply some validation that the value of the field how many record you want to create should always be greater or equal to the counter than how we can do that because in the screen element we are having one section validate the input but I was unable to set the formula okay so I just need to open that flow let me just search so we created this flow and I think here only we applied this so we have object selection here we are creating so here we have input but here we have error message and then we have formula okay so here we can insert the resource so resource API name is this so let me just copy it so this way I think it should work so I am just clicking on done so now I am just clicking on save as okay I am just going to debug let me test it whether it will work fine or not okay it is not validating that I just need to modify that again no I just need to check it so we will check and show you that statement okay actually this is very rarely used feature on the screen validate input so we just need to set this formula so I will be checking like how we can do that and we will get back to you and Afghan is asking can we can't call yeah so this is the answer and can you give example on view test okay so here if we go to record trigger flow so just click on view test create so here you can just create test cases so set details trigger and path set initial trigger so here you can select the record and here you will be able to fill the information and then just save it then here you can just select this like create update run immediately then here you can select the record and provide the values and then here you can set the assert like what should happen so this will be assertion like on account total contact so that field should be equals to this so that way you can just apply the assert okay but it is not used much because you can just test it through debug or from UI so it is somewhere similar to the test class that we implemented through that we implement through code okay so here actually we won't be able to have that account so that's why we won't be able to write that assert okay but for same record I think you will be able to use it okay so just try it this way if you are able to okay guys so I think I am able to answer all the questions so this is done for today's session and tomorrow we will be discussing some more scenarios thank you everybody for joining this session