 Let's understand how we can debug the core trigger flow. So in my previous video, I demonstrated you how we can create a related opportunity on account creation. So if I open the configuration of that record trigger flow so you can see object as account trigger the flow when a record is created condition is like active equals yours and optimize the flow for actions and related records. So these are the configurations and this is the element that is create opportunity element. So here you can see account name close date then stays a pick list value and account idea set to these respective fields. So if you have created a record trigger flow and before activating that flow if you want to debug. So that is quite easy. So you just need to click on this debug button. So it is asking like if you haven't done any changes so you can save so what I can do I can just click on save as so that a new version will be created. So you can see now it is not activated. And if flow is not activated so it won't work if you do some changes on the UI. But the requirement is we don't want to change. We don't want to activate the flow and we want to check it from this flow builder only. So you just need to click on this debug button. So here you can see you have the option path for debug run so we only selected run immediately so that's why one path is available. If you create scheduled paths in your record trigger flow then that option will be available here. Now debug options like in our record trigger flow we have an entry criteria. So if you want to skip that so you can enable this checkbox. So it will debug like your entry criteria will be missed and it will be tested. Right. You can read this help text as well runs the flow even if the record selected for the debug run doesn't meet the condition requirements that are specified in the start element. So I am unchecking it as of now then run flow as another user. So this option is disabled in your orc's process automation setting. So we need to enable this option if you want to run your flow as another user. So right now it will be running through the logged in user. Then run flow in rollback mode so it is by default enabled. So it says runs the flow without permanently changing the data in your Salesforce records any database changes that the interview makes our rollback. Once it ends record triggered flows always run in the rollback mode. Right. So we can't control this it is by default selected. Now at the bottom you can see triggering record that we can select. So for the debug run. We trigger the flow as if this record is created updated or deleted. Right. So I am selecting this one as if it is created because our flow is configured for creation only. So now flow will be debug like this account is created and then the elements which I used in the flow will be tested whether they are working fine or not. So I'm clicking on run and you will see the step by step results. So here you can see this yellow line is available which is like starting from the start and then going to create opportunity to record and then to end. And we don't see any error message available here. So here you can see this is basic debug log. Right. If you click here. So you can select these options as well like show API name show governor limits consumption show transaction boundaries. So if you want to see you can enable these check boxes. If you want to expend all in one go. So you can click on this button so you can see everything is expanded. If you want to expend them one by one so you can click. And read the information here like the record ID is available. So in my previous video I told you for which record this flow is triggered so that record ID will be available in this global variable that is dollar record. Then start condition so it is checking like active years equals years. So if active is equals to years then it is true. And here you can see create record element so account ID close date name stage name everything is set with the values and record is ready to be created when the next screen pause or local action is executed or when the interview finishes. So this is the opportunity record that will be created but the rollback option was selected by default. So you can see it is saying because the flow ran in rollback mode, any changes to add, delete or modify records for rollback. Okay, so these changes you won't experience in the UI if you run your record trigger flow in the debug mode. Then it is how interview finished. Right, so these are the information now knowingly I'm going to do some changes in the flow so that it fails. Right so till now I showed you like how we can debug the record trigger flow. Now I'm going to show you like what happens if this record trigger flow fails in the debugging. So I am just removing this because stages required field and I just deleted that row, so that it will throw an error. So I'm just saving it clicking on debug selecting the record and clicking on run. So here you can see this time yellow line ends here and here you can see warning or error message. So it means your record trigger flow stopped here only at top you can see field message available and wherever it is failing so that is showing the message as well. So this error occurred when the flow tried to create reports required field missing required fields are missing that is stage name. So this way, you will receive the information. Okay, so if you enable the chat boxes so you will see some more information if you expand on. So here you can see element governor limit conception, then yeah this is the additional information that we got from here. So if you enable the chat boxes so you receive some additional information as well. Right, so this way I showed you like if your flow is not working properly in debugging. So how you can check the errors and accordingly you can modify the flow. So the benefit of debugging the flow before activation is like if your flow is failing for some reason, so you can modify that and again you can debug and test if it is running fine then you can activate and you can test it with the org data.