 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate you how to create custom fields in Salesforce Lightning. Before starting, let me show you how you can search on YouTube. You can type my name. My channel will be available there. You can watch various Salesforce related videos on this. So in my previous video, I created one custom object in Lightning that is book. So now I'm going to create some fields for that object. So first, let me open this my university app and new tab. So here you can see book tab is available, which is related to book object. So if I click on new, so it will not show any field. It is showing only one field that is created at the time of object creation that is book number. So now we are going to create some more fields so that we can enter the data in book object. So from here I need to search for that object. So here book is available. It is a custom object because underscore underscore C is available here. So I'm clicking on it. So it is open. Now I need to click here field and relationship and from this new button I can create new custom fields. So first time creating a text field so that I can enter book name. So its label will be book name length will be 50. Now, here you can see you can fill the description like this field will contain book name. Then help text enter book name. Then next option is required. So if you want this field to be required whenever you want to create a record so you can check this checkbox. If you want this field be unique so you can click on this checkbox. You can also select case sensitive and insensitive option. Then there is an option for external ID so you can set this field as the unique record identified for an external system. And if you want to put some default value, you can fill it here. So here you can see various options are available like includes text and pick list value API names in double quotes. So if you are filling default value for pick list and text. So you need to put those values in double quotes include numbers without quotes like this show percentage as decimal like this and express date calculation in the standard format like this today or today plus seven to reference a field from a custom metadata type record use so you can use this format. So if you want to put default value so you can follow these instructions. You can also use formula syntax to build default value. So it is opening help. So let me click on next. So here you can see some help is available so you can read this and you can use these things in as a default value. So now you can see field level security for profile is available here. So there are two options visible and read only and different profile profiles are available. So you need to set this option for individual profiles. So, so here visible means this field will be visible on page layout as well as it will be in editable form. If we select read only, then that field will be visible but you cannot edit that field. So you can choose the option as per your requirement if you check both visible and read only. So this will become non editable. If you choose only one option like visible then it will be editable also. Now if you want to make it visible for all the profile you can check this checkbox. And if you want to make it visible and read only for all the profile you can select both. So right now I'm selecting visible only I'm clicking on next. Then this option is for adding this field to page layout. So we have one page layout for book object. So if you want to add this field automatically on the page layout you can check this checkbox. Otherwise you can uncheck it also. So you can later on also add or remove fields from the page layout. So I'm clicking on save. So now you can see book name field is created here. It's data type is text label is book name. And these are some fields that are created automatically created by last modified by other ID and name we created. Sorry book number a label we created while creating the object. So you can if you watched my previous video you can understand this. It's data type is auto number and it's field name is or you can say API name is name. Right. So now if I move to book tab so first I need to refresh because I created one field. Now if I click on book tab and click on new. So here you can see one field is available book name. This is the help text that is enter book name. And if I enter book name here like same force. Lightning so it will create a record after saving it and an auto number will be created automatically. So this is the book number that is auto number B dash 001. This is the book name owner name that will be the user who is creating the record then created by and last modified by. And this is the related list option. So right now this object is not related with any other objects. So it is empty. So this way we can add fields on an object so that we can fill the data. So I'm going to create one more quickly. That will be currency field will be price. So now I hope you understood what is description and hat text. So I'm leaving them as blank and required. You also bought like this field should be required by creating the record. You can check it and default value. So right now I'm feeling default value is 0.0. Clicking on next making it visible and editable for all the profiles and putting this on the page layout. So let me uncheck this. So right now this will not be available on the page layout. So we will be manually adding it to the page layout so that you can understand that also. So I saved this so you can see price as currency is created. Now if I refresh and if I create new record. So you will see that new field will not be available because we didn't add it on page layout. So now I'm going to open page layout. So here you can see all the fields are available. So scroll down simply drag and drop this field wherever you want on the page layout. So here you can see different sections are available. So you can simply place it. So I placed it here. You can also place it just after the book name. So it totally depends on the requirement. Now you can click on quick save. So it will be available here if you click on save so it will disappear. You need to open it again. So I just clicked on quick save. Now I am refreshing it. If I click on new so you will see price field will also be available on page layout. So now I feel it like salesforce classic and fill 1000 and click on save. So you will see the details. Name is Salesforce classic and prices $1000. Now let's see what happens. And here you can also notice book number. So be 002 is already automatically created. And it is also visible here. So this is the field that we created at the time of creation of the object. So here also you can see prices available. But it is blank because we didn't fill it. Or you can say we created this report before creation of this field. So if you want to fill this, you can simply double click and you can just enter the value and click on save. So this way we can create custom fields and Salesforce lightning. You can also watch my further videos where I will be demonstrating you how to create lookup and master detail, roll up summaries, formula fields. So all these will be related to Salesforce lightning experience. So do follow those videos also so that you can learn how we can create different kind of fields in Salesforce lightning. I hope you understood whatever I demonstrated in this video. If you want to watch more videos, you can search me on YouTube by my name. Thank you for watching this video.