 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to cover these points. So I'm going to tell you how to place lightning screen flow on record detail page. And the second point is the example will be create opportunity related to an account, right? Before starting, let me share you. So if you want to follow Salesforce training videos, you can search my name Sanjay Gupta on YouTube. And you can follow my YouTube channel. Here you can see various playlists are available related to Salesforce and other programming languages. So you can pause them to learn programming. So now I'm going to first explain this flow that I demonstrated you in my previous videos. So we are going to use this flow for opportunity creation. I'm just going to modify this flow so that we can delete account ID as well. And then we will be using this flow on account record detail page. So this screen, this is first screen, which is going to read opportunity name and close date. This is the second screen, which will read stays name of opportunity. And then this is the create record element. So this create record element is assigning opportunity name, close date and stays to these opportunity fields which are named close date and stays name. So right now we are not associating account name. So sorry, account ID. So we need to associate that as well. So for that purpose, I'm going to create new resource that is a variable. So its API name is record ID, not account ID. It will be record ID. Data type is text. Available for input. Right. So whenever you place any lightning flow on record detail piece. So that records ID will be automatically pressed into flow. And it will be stored in this record ID variable. Remember that your variable name should be record ID always. If you provide any other name apart from record ID, then that record detail page record ID will not be stored in flow. Now, in this element, we can assign that. So here in account ID, we can put that record ID. So that this opportunity will be linked to a particular account. Now I'm saving this. So in my previous videos, I didn't activate this lightning flow. I just debugged it. Now I'm going to activate it so that we can use this flow in record detail page. And if I refresh this, so you will see one entry related to this flow will be available. So I'm also going to show you how we can see versioning of flows. So here you can see create opportunity record flow is available. This is screen flow, which is active. And from here, if you click, so this is edit access, this is edit details and this is view details and version. If you click on view details and version, so all available versions related to this flow will be displayed. So it is rendering. So here you can see all the details are available. Right now we have only one version because I activated it right now. If I modified this flow and again save it. So again, a new version will be created that will be version number two. Then this is the flow URL label and all other things are available. If you want to delete this flow, you need to deactivate it and you can delete this. And if you have various versions, so you can pick a particular version that you want to active. So from here you can be active or active or particular flow. You can open it and you can run it. So these are some brief information about the screen flow. So our flow is activated. So right now I'm going to open any account. So we are on account detail page. Now if you want to edit this, so you need to click on this gear icon and you need to click on edit page. So here you can see this account record page is available in edit mode and this is lightning app builder. Here it will show all the available components that are shown on record page. So we are going to add flow as a component. So if you scroll down at left hand side, you can see standard components are available 33 number and here flow is one of them. So now it is rendered completely. So if I want to place this flow, so you need to choose a particular block where you want to place this. So here suppose under detail, I'm putting it. So I'm just scrolling it down, clicking on flow. So it is saying select an incision point for the component, either an empty reason or before or after another component. So we don't need to click on this. We need to drag and drop it. I'm dragging and dropping flow. So you can see under detail page. This is available and this is create opportunity record flow. So from here we can select a particular flow. So right now in this or we have only one flow. So that's why it is by default available here. So you can read this help text only active screen flows are supported for this component. So on account record page, this flow is available. Now we can click on save. We can click on activation. So the record page is modified. So we need to activate it. So here three options are available or default app default and app record type and profile. So right now I'm choosing or default and it will be available for desktop and phone. Clicking on next and save. So right now this is our default account record page. So I am clicking on back. So it will open up account record detail page again. So here you will see that flow. So the screen flow will be available on detail page. So here you can see the label is available create opportunity record. And this is the first screen. So let me enter these details. So create. For detail page. Choosing close date. Clicking on next. Here I need to put stage name. So I am choosing value proposition. And I'm clicking on next. So it's done. Opportunities created. So let me go to related list. So here you can see related opportunities created. And if I open it in another tab. So you can see I didn't put any record ID or the ID of this account record in flow. It is identified automatically because of that record ID variable. So these are the details opportunity name create opportunity from detail page account is linked automatically close date and stage. So remember that whenever you place your lightning flow on detail page record page. So you need to create this record ID variable that automatically fetches the ID of that detail page. And you can use that record ID in your lightning flow so that you can create a relationship between the between two records. Whether they are look up with whether they are using look up or master detail. So this way you can use your lightning flow on record detail page. So I hope you understood how we can put our flow on record detail page and we can use that. So on account we used it. So let me show this again. So on details. So here it is available to account report page is containing your lightning flow if you have more than one lightning flow. So there will be options you can choose which flow you want to display. So if you want to watch more Salesforce training videos you can search my name Sunday book on YouTube. And you can open various playlist and you can watch them to learn programming. So I hope you understood whatever I demonstrated in this video. Thank you for watching this video.