 Hello friends. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate how you can create quick action that will be object specific and it will perform operation that is to create new record and it will be implemented in Salesforce lightning experience. Right. So before starting, if you want to watch more Salesforce training videos, so you can open my channel and go to playlist. So here, various playlists related to Salesforce and other programming languages are available. So now I'm opening account object. And if you open any object, so there will be one option that is button action and links. So you can open this and from here at right inside you can click on this new action. So from here you can create a quick action that is specific to this account. Right. Now, here if you see I am on account tab and I have already opened one account record. And after creation of that quick action, it will be available here. So that quick that quick action will be available on each of the record related to that object. Whenever you click on that button. So through that button, you can see a form that will be opened and you can fill the details that are available in that form and you can create a report. So now I'm going to show you how you can do this. So I'm clicking on this button. So here you can see a new action form is available. So here, various action types are available. So right now I'm choosing create a record, but you can do these as well. Then target object will be opportunity, because I'm going to create opportunity record through account. Then if, if your object is having target object is having multiple record types, then you need to choose a particular record type as well. So this action will be object, object specific as well as record type specific. Then here we need to choose the label. So I'm choosing create opportunity. This is the API name of this action. And here you can put any description and here you can put the success message, right? So here you can read this help text this message displays when an action is performed successfully, but does not create a form field. For more information, see the Salesforce app help. So we need to uncheck this and here we can type a message like new opportunity record is created successfully, right? And now I'm saving this record. So sorry, I saved the correction that I created. So here you can see it is showing this default form. So here on opportunity, opportunity name, close date and stays are required. And other than that account name amount and next step, these are also available. So I am removing this next step. So amount is there. If you want to add more fields related to opportunity object, you can put them. So let's say I want to add description. So I put it here. I'm putting lead source, then I'm putting quantity and let's say account phone. So these fields I also want to display on that form while I will be clicking on the correction. So now I'm clicking on save. So this way you can see the layout is saved. Now, one more option is available here as a predefined field values. So whenever we click on that quick action, and if you want, after submission of that form, you want that these fields should be pre populated or pre defined. So you can put them here. So first I'm going to demo you how we can place quick action and how we can create the report. Then I will be showing you how you can define these predefined field values. So if I click on this button links and action. So here you can search like this create opportunity action is available. And all other details are available here. So these are the headings accordingly. You can see what are the details. And if you want to edit that again, so you can click here. If you want to delete it, you can select this option. Now, if you want to use that quick action on your account record page. So, sorry, we need to click on page layout. Then right now I'm using account page layout. So you need to open the specific page layout on which you want to place that action. So from here you need to choose mobile and lightning actions. Now, scroll down. So here in this section, you need to place that. So now I'm going to search for create opportunity. And I'm moving it to first option. I'm clicking on save. So this way I perform two operations. First I created quick action and then I placed it to the specific page layout. Now, if I refresh this page, so you will see that action will be available here. And that is object specific. So it is available on account and it will be creating the record related to opportunity. And for opportunity, it will be creating a record for a particular record type. So these things you need to keep in mind. So here you can see this button is available. So I'm going to click on this button. So here you can see all the fields that we selected are automatically available here. Account name is chosen by default because this button is available on this account report. So it is populated automatically. Here you can fill the opportunities or best opportunity to action. So it is the name. Then we can choose close date. Then we can choose any stage. You can fill the description, the source quantity and phone. And here you can fill the amount. So this way you can fill all these information. Three are required like opportunity name, close date and stage and rest are optional. So if you want to leave them blank, so that is also possible. So now I'm clicking on save. So you will see an opportunity will be created automatically. So here you can see test opportunity through action. This is created automatically. So this way you saw how I created quick action and how I used it on a particular object to create record of another object. Now I'm going to open that button again and I'm going to show how you can set the values for predefined piece. So yeah, here it is. So I'm going to click on new. So from here I can choose the fields that I want to fill as a pre populated. So let's say I am picking this description. Right. I chose description. Now here I need to put the predefined value that will be automatically populated here. This is of text long text area type. So I need to put the value inside double quotes. So this record is created through action. So this is the predefined value that I want to put here. So I'm clicking on save. So here you can see one entry is available. Right. And now I'm going to edit the layout. And I'm removing this description field from here because it will be pre populated now. So this is a predefined field value that will be filled automatically whenever I will be creating a record through that action. So now again I'm going to refresh the page. So this time when I create opportunity record through account. So this description field will be auto populated. So if I open this one, if I open this record and if we see the opportunity detail page so you will see description will be having value as test because we filled test while creating the opportunity. So I'm clicking on details. Here you can see it is containing test. Now, I'm going to create one more opportunity. It is not the first correctly because it is showing description. Yeah, it is updated. Again I'm clicking on create opportunity. Yeah, this time you can see description field is disappeared not available here. So test action to this is the name of opportunity. Now I'm populating close date I'm populating stage as prospecting filling the amount lead source quantity and phone number. I'm clicking on save. You can see one more opportunity is created whose name is test action to I'm opening this and this time you will see description field will be having predefined value. Here you can see this record is created to action. So this way you can put this way you can put predefined values for a particular action. So here you can create any number of fields that you want to predefined. So click on you add a select a particular field and put the default value that you want to work. And if you want to place a particular field on layout so you can click on this layout drag and drop fields on this layout so that you can use them on action. So this way I explained you how you can create object specific protection to create new record in Salesforce lightning experience. So I hope you understood whatever I demonstrated in this video and if you want to watch more Salesforce training videos you can open my channel and go to playlist and watch them. Thank you for watching this video.