 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate how to use new task action to lightning screen flow. So we can create tasks using lightning flows. So I will be demonstrating. So if you want to watch more Salesforce training videos, you can search my name Sanjay Gupta on YouTube and you can watch various playlists related to Salesforce and other programming languages on my channel. Do follow it. So now here you can see I have already implemented basic lightning flow, which is to create context. So here you can see I have one screen component that is last name. Then I'm going to create a new contact and this contact will be automatically related to an account. So I'm receiving record ID as input and assigning last name. Now I am creating one more variable so that I can store this contact ID. So creating new resource variable, its API name will be contact ID and its data type is text and clicking on done. So here it is. So this contact ID variable will be receiving the newly created contact record. And here you can see I created record ID so it will receive input and input will be account record ID. So whenever you want to receive records ID automatically then you need to create record ID variable in flows. Now, after this create record, I'm going to put action element that is create new tasks. So you can search for new tasks here it is protection so you can use this so create a task. So just after creation of contact record, a new task will be created and you can assign that task to a particular user. So let's say, here you can see this required feed is available assigned to ID so to which the user you want to assign this newly created task. So here I'm going to create new resource as formula. So let's say its API is logged in user and its data type will be text. And here I'm going to create a formula to identify current logged in user ID. So this way I'm able to fetch the current logged in user ID and I'm clicking on done so here it is. So this record will be assigned to the user who is creating the record a contact record and that task record will be assigned to that user only. Then these are some optional values you can fill them so let's say you date. So here also you need to create one more resource to fill the state. So I'm not populating it. Then here name ID so here we can put that contact ID. So this task will be automatically linked with this contact. Then other optional values are also available let's say subject. I'm filling this call and you can fill status as well. So I'm not populating this as of now. So I'm clicking on done so you can fill all these well all those values as per your requirement. Now I'm connecting this saving it as a new version and clicking on activity. Now I'm going to use this screen flow on a count record page. So I'm just clicking on edit on a count record page so that I can simply drag and drop that flow component. So here at left hand side you can see this flow component is available. So I'm just dragging and dropping it on a count record page. So here it is so it is having create contact and you need to check this checkbook so that current record ID will be passed to this flow. I'm saving this clicking on that. Now I can create new contact and you will see a new task will be created automatically through that flow. So right now you can see this account is having two related context. So now I'm creating one more. So desk task. This is the last name clicking on next. So here you can see this record is created. I'm opening it on a new tab and you will see a new task will be created or should be created automatically. So here at right hand side you can see this is the task that is created automatically. I'm opening it new and opening it in new window so that you can see its details. So it is opening and here you can see task tab is automatically open and it is assigned to me because I am the current lump in user subject is called status. We didn't provide it name that name is the record to which it is related and due date we didn't fill it is normal that is populated by default. So this way you can see those fields which we populated our field and others are blank. So this way I hope you understood how we can create a new task using lightning flow. So this is pretty much important and it will help you in your projects and assignments. So I hope you understood whatever I demonstrated in this flow. If you want to watch more Salesforce training videos you can search my name. Thank you for watching this video.