 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate you how you can create custom fields in Salesforce. So clicking on login. Meanwhile, you can see how you can search me on YouTube. I'm available here by my name Sanjay Gupta. So you can search my channel and watch various videos. So friends in my previous video, I demonstrated you how to create custom objects. Now I'm going to create custom fields for those objects. So I'm switching to university app. So in this app, I placed two custom tabs student and employer student tab is related to student object and employee for employee. Right now we are going to learn like how we can create custom fields for these objects. So if I click on student and click on new, you can see I can just enter the student name and if I click on employees and click on new so you can see I can't enter anything because in student that name is of text type so that I can type button employee that name is of type number. So if you watched my previous video, then you will understand this thing or if you want to know it again. So I'm taking you to the objects. So we have these two objects. One is student and one is employer. So I opened them in new tab. So here you can see if I click on edit. So here you can see the data type of record name is text, but if we click on employer and click on edit. So here you will see data type is auto number. So this number will be created automatically for employee, but for a student, we need to type the name as a unique entity so that we need to type explicitly that's why it is showing a name for student but not showing a name for employee. Right. So first let me create fields for student. So to create custom fields, you just need to search for the object. Then click on that particular object. If you scroll down, you can see the standard fields and custom field sections. So in standard fields, you can see created by last modified by owner and name. These are available by default. So this is the field that we created while creating object student name. It's type is text. Right now I'm going to create custom field. So I'm clicking on new. So it will show all available data types. Right. So I'm not explaining all right now I'm just explaining some of these like first time taking number because I want to put student roll number. So the data type which I chose is number. Its label will be roll number. So here you can put length and decimal places also. This will be the API or unique name for this particular field. So these are the help text. You can also read these things like the field name is an internal reference and is used for integration purpose such as custom links custom as controls and API. So it's very careful when changing the field name as it may affect existing integrations. Right. So we don't prefer to change these APIs because if these are used in some of the places then it may create some problem. Here you can write the description like this field contains roll number. Here we can write the help text. So we'll see what is this help text. So it will be available while we will be placing that field on the layout. Then you can see these options like required unique and external ID. So that description is written over here. Required. It says always require a value in the field in order to save a record. So while creating any record you need to fill the value for this field if you check it. Unique means do not allow duplicate value. So while creating multiple records, you cannot put same values here. So we can choose unique roll number like because roll numbers are unique. Then external ID set the field as the unique record identifier from an external system. So if you want to link this field with an external system. So you can check it so that it will set this field as the unique record identifier for an external system. Then for default value you can choose this formula editor or you can read this example like how we can put the default values. So right now I'm not putting this one just clearing on next. Now, similarly, like when we created a tabs and applications, the profile thing were there. So while creating a particular field, you will be asked like which profile user can access that field. So we have two options here visible, as well as read only. So if we check visible only, it means this field will be available for view and for edit purpose. But if we take visible as well as read only, so that field will be available there as visible, but we can view that field value. We cannot edit that. Right. But if we uncheck both, then that field will not be available for view, not for editing. So it means that field will not be available for this profile. Right. Right now I'm checking this field availability for all profile users. You can change the setting later on also as per the requirement. So you will get to know more about it like while you will be understanding about the profiles. So in my video which is related to profile you can understand like how we can control field level security through the profile. So here you can see field level security for profile. So we can set it two times like while creating the field and after creation of the field through the profiles. So we can go on individual profiles and we can set the field level security. So right now this field will be available for all profile users both for view and edit. Now we have one more thing that is space layout. So for each object we have layouts. So if you want to place this field on the layout so that you can view it and you can enter the values. So you need to check this checkbox as true. So I am making it true and clicking on save. Here you can check that field is created in the custom field and relationship section label is roll number API is roll underscore number underscore underscore C then this data type. Right. So here you can differentiate standard and custom fields for standard fields. You don't have underscore underscore C but for custom fields you will always have underscore underscore C at the end of API name. So this way we can uniquely identify like which are standard and which are custom fields. Right now. I'm going to open this tab. Clicking on new. So here you can see along with name numbers are also here and this question mark is representing help text. So it is saying fill roll number so so that user can know like what type of information we need to put here. So like I'm putting student name as test and roll number as one and clicking on save. So this record is created. Now if I click on student app so it will show this detail. So right now I created only one record. That's why it is showing this detail. Right. Now let me create one field for employees so that you can view how that auto number will be available. Move into setup. This time again I'm searching for object opening employee scrolling down clicking on noon. I'm again going to create a number field for employee. So let's suppose we have employee ID in form of number label will be employee ID. So this is the field name then description you can fill help text you already know what is help text now. So help text is fill employee ID. It should be unique. Now I'm also selecting required. Clicking on next. You can see I marked it as required. So now this will be available for each profile because it is required. So we need to fill this. Otherwise, we cannot save the record. So here you cannot uncheck any profile. So it should be available on layout because it is required. Clicking on save. If I go to employee tab click on noon. So here you can see this red sign is all also available here which is for required information. So if I leave it blank and click on save so it will show an error message that you must have that you must enter a value. Right. And this is the help text fill employee ID. So now I'm filling employee ID as 12345 and clicking on save. Right. So this is the auto number you can see employee name is automatically available here. Right. So in case of student. If I open student tab. And this record. So here you can see this name is test and we explicitly provided this value because this is of type text. In case of employee we choose auto number by creating the object. So this is created automatically. Right. So if I click here. So it is e dash 0000. Now if I create one more. With same. Employee ID and try to save. So it will show the duplicate value on record. So it is showing that this employee ID is already used by this record. So you cannot use it because we set this field as unique. So I'm choosing this one. Clicking on save. So here you can see it is showing employee name e iPhone 00003. It's kept to zero two because that shown an error message. Because of the duplicate value. Right. So this way we can create fields and we can fill the data. And I hope you you also understood that thing like why creating object. What is the meaning of that name field. What happens when we choose text or what happens when we choose auto. Right. So this way you can create various other custom fields. So let me take you to the game. So we created one custom fields for two different objects. Now if you want to create one more, you can click on new. So like you want to fill student email ID. So you can click on email. Click on next. So label is email field name. Then you can put description and help text. So the now you are familiar with description and help text. So you can fill it accordingly. You are also familiar with required and unique. So we are not checking these fields now. Then it is asking for the profile. So I'm selecting. It should be visible and editable for all. All the profile users. And it should be available on the layout. Now I'm clicking on save. So you can see now we have two custom fields. What is email and what is rollable. Right. I'm clicking on students. Clicking on new. So here you can see now we need to fill three things. Student name, roll number and email. So for email, we didn't provide the help text. So it is not available, but for roll number, it is available. So this way you can customize the things as per your requirement. So. Here's we need to fill the name of student like I'm filling my name Sanjay. So roll number is two. And email is. Text school. So this way I created the second. Right. So now we have two records. I want to open this one. So it will be open. If I want to add it to things, I can edit. Now I'm. Now I'm going to create one more. Number is three. I want to see one more thing like I provided invalid email address without any iterate or website name. So this email data type automatically checks it. So this is the system validation that is provided by the email data. So you don't have to take care of these things while choosing data types. So try to choose appropriate data type. Like if I choose text instead of email, then this email will not be validated automatically. So if you want to put email IDs, then choose email as the data type or particular field. Here I put valid email address, then it will be saved. So this way I created. Two custom fields, one email and one number. Similarly, you can create other fields. And also in my later video, like in my another video, I am going to demonstrate you all the field creation for these fields and also watch the video related to page layout. So that you can arrange this layout. Like right now you can see all the fields are available in single column. So if you want to change the location of the field that you can do with help of page layout. So you can watch that video also let that how we can set the page layouts in Salesforce. So I hope you understood like how we can create custom fields for custom objects in Salesforce. The same process you can apply for standard objects also like if you want to create custom fields for standard objects, then the same process you can follow. So I hope you understood whatever I demonstrated in this video. Thank you for watching this video.