 Hello, everyone. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a scenario based on record trigger flow. Let's understand the requirement of record trigger flow scenario first. So in this video, I'm going to demo how you can use delete record element. So the requirement is when an opportunity is set as closed lost, then we need to delete that opportunity record. Right. So I'm going to create new flow selecting record trigger flow. Now here I'm selecting object as opportunity and a record is updated. Now here I need to set the condition. So if opportunity stays is equals to closed lost. Right. And I'm selecting this option like this option says only when a record is updated to meet the condition requirement. It means earlier stays was something other than closed lost. Now you updated and it is closed lost. And this particular field is updated. Right. You can read this help text as well. Perhaps you want the flow to run only when the triggering record is changed from not meeting the condition requirements to meeting the condition requirements. When that's the case, choose the second option. Right. And let's select fast field update because we need to do operation with the same record. And let's check whether delete record. Okay, delete record is not available. So we need to choose the second option actions and related record. So here you will see the lead record is available. Right. So we need to delete the record. So here we have two options. Use the ID stored in a record variable or report collection variable. So we don't have that. We need to specify the condition. Sorry. So I need to select the opportunity object. And here I need to provide ID equals and then record dot ID. So whenever you update any record. So that record that you updated through which this record will be triggering so that records ID or all the fields information will be available in this dollar record variable. So from there, you can just have the ID. So this delete record element will be deleting the record whose ID will be matching with this report dot ID. And then I'm clicking on done. So this way delete record element is available now. I can save it. So naming it as data for delete opportunity and I'm saving it. Now I'm just clicking on activate. So now just watch the demo carefully because whenever I will be updating any opportunity to close lost. So you will see some error like it will say like your record is not available to you because once you change the stage, the record trigger flow will work and that record trigger flow will delete your opportunity and it will go to recycle bin. So if your record is not available under this tab, so Salesforce will throw some error. So as I hit on save, you will see an error message. So it is saying the requested resource doesn't exist. Right. It is visible but now you can't save because it is deleted. So opportunity name is account 2203 if I go to tab again. So you can click on discard changes but here you won't see the opportunity. If you search for recycle bin so there you will find your opportunity. So you can see account 2203 is available here. So we deleted this opportunity so it is available right now. Okay, so this way if you want to apply delete record element in the flow. So this is a simple use case which I used but in your case use case may be different but this is the way how delete record element works and whenever you delete any record through flow you can just go and check those records in the recycle bin.