 Hello everyone, I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate the use of data loader. So it is used to do insert, update, upset, delete and export operation. So let's understand the setup, how to set up data loader. So this is how data loader looks like. So it is already installed in my system. Now I'm going to tell you how you can set up data loader in your system. So you just need to jump to your org and here you can search for data loader. So this data loader option will be available. So here you can see we have two options. You can set up data loader for Windows and you can set up data loader for Mac. So before downloading data loader, you can just open the installation instructions. So first time opening Windows installation instructions. So if you are setting up your data loader for Windows, so before downloading and installing data loader, you just need to install Java runtime environment version 11 or later. So here you can see this link is available. If you open this link, so through this link you can download this free version. If you download it and then if you go to this page and like after installing Java runtime environment, if you click on download data loader for Windows, so it will be installed and you just need to follow the instructions like step number two and so on. So whatever is mentioned here with this link, Windows installation instruction. Similarly, you can open this Mac installation instructions. So here you can see for Java runtime environment, we have a link. So through this link, you can install .dmg file and after that, you need to download data loader from the setup and you need to follow these instructions. So these instructions are available with both Mac and Windows. If you follow these instructions, you will be having data loader installed in your system and one icon will be available on the desktop through that you can launch your data loader. So this way it will look like, right? So this way you can set up your data loader. Now once your data loader is installed and you are having its icon on the desktop and you are able to launch it, so you need to link your data loader with your Salesforce org. So you just need to click on any button and here you will see these two options, authorization or like authorization, org authorization, you can say, and password authorization, right? So if you select org authorization, so here we have two environments, production and sandbox. So as per your environment, you can select and you can click on login. So it will open this pop-up where you can enter username and password. So let me just go back and have my username. So what you can do if you don't remember the username, so you can just go and search for users and you can copy your username and you can paste it. Then just type your password and click on login. So it will send you a verification code. So like I have already connected one time. So that's why it is not sending me verification code. But first time it will send you verification code on the email. So you need to enter that and then click on allow. So here you can see it is saying login successful, right? So if this message is available, it means your org is connected with data loader. Second option is this password authentication. So you can simply type username, password and the URL and just click on login. Right? So you can choose any way whichever you like. So I'm using developer edition org. That's why I chose environment as production. If you are working on real-time projects, so you might be having a sandbox environment. If you want to link that, you can select sandbox as well. Right? Now you can click on next and from here you can do particular operation. So this way I hope you understood how we can set up data loader in our system. So next, let's understand how we can insert records through data loader. So for that, we need to create some data in the Excel sheet. So I'm going to work with account object, right? And if I compare data loader with data import wizard. So in data import wizard, you have a limit of 50,000 records. In one time, you can insert 50,000 record. But in data loader, this limit is 5 million records. In data import wizard, you have limited standard objects for those you can import or insert the data. But in data loader, you will be having all standard objects for which you can insert the data. And as well as you can use custom objects as well. So here I'm going to use these four fields related to account. So I'm filling this. So this way I created one record and I'm just copy pasting it and it is 102. Here I'm changing the value. Right? So this way these two records are available in the sheet. Now I'm going to download this sheet as a comma separated values. So you can see the sheet is downloaded as info-account, right? Now I can use this CSV file with data loader so that records will be inserted. So before that I'm jumping to accounts and doing a refresh so that we can see like how many records are already there. So you can see total 24 records are available, right? Now let's jump to data loader and click on insert. So here you can see we have this checkbox like show all Salesforce objects. So right now it is showing limited objects. If you click here it will show all available objects standard as well as custom. And you can search your object in this list so that you can save your time. Then from browse you can select your CSV file. So here it is info-account.csv. I'm opening it. Now I need to click on next. So initialization succeeded. Your operation will contain two records. Okay. Now here we need to map the CSV headers with the fields. So you just need to click on this create or add it a map. If you have any existing maps so you can use that as well. So I'm just clicking here. So you have these buttons like if you want to clear mapping or you want to auto match. So I clicked on auto match. So you can see first column is showing CSV headers and second column is showing the field of account object. So they are mapped like account will go to account. So the active will go to active and will revenue will go to and will revenue and so on. If you want to save this mapping for future use you can save. Otherwise you can just click on. Okay. And then next. Now here. Staff 4 says like select the directory where your success and error files will be saved. So in the download folder, your success and failure files will be available. So if you want to change this location so you can browse. So let me choose documents and open so in documents success and error files will be available. So I'm just clicking on finish. So you have chosen to insert new records, click yes to begin. Do you want to proceed? Yes. So insert started and here you can see two records were successfully inserted and zero errors. If you want to view success or view error, you can click. So if you click on view success, it will show results like this. And if you click on view errors, so there is no error. So that's why it is not showing any error. If there is any error, you can see it here. Also success and error files will be available in documents as well. So just click on. Okay. So insert operation is done. Now what we can do, we can come here and do a refresh. So we have 24 records. Now if I refresh, so you will see. 26 reports. So you can see total 26 items. And you can see at the bottom 26 is the count. And here we have these, those two records account data one, zero one account data one, zero two. If I open this record so I can see all the details which I provided annual revenue name. Active is yours and description is insert data loader. So this way. The third operation is completed. Now if you go to your documents, so you will be able to find those success and failure information. Right. So if I, if I open the documents. So, so here, like I'm going to show you the file. So in this documents you can see like these success and failure information are available. So this is success file and this is error file. Right. So this way demonstrated you how we can insert records. Now let's understand how we can update existing records to data loader. So for that we will be using same sheet and if you want to update existing records so for that we need IDs. So right now we have only two reports I'm going to update both the reports so I'm going to copy their IDs manually. So this record is open. I'm just copying this ID from this URL. Paste it here. So you might be thinking if we have lots of records so do we need to copy these IDs manually. So answer is no. We have export operation. So through export, we can extract all the data together and we can update and then apply update DML. Right. But for demo purpose like I have only two records so I just manually copy these IDs so that I can quickly show you update because we have export operation as well so I will be showing you that as well. So you will realize like export will be having IDs populated automatically. So you don't need to manually copy those IDs. So just understand the process right now. So you can assume like you have already IDs already given in the sheet. And here I'm going to update these so it will be update and update. Right. So I updated the description only with IDs. Now I'm going to download it as CSV. Now I need to click on update account browse. So in the downloads, I need to find. Yeah, this is the updated one. I'm opening it clicking on next initialized. Then I need to map these so auto mapped. Click on OK. Next, then finish. Yes. So two successful updates, zero errors. Okay. Now just go here, do a refresh and test both the records, whether their description updated or not. So you can see description updated. So this way I showed you how you can update the records. So you understand now how to absurd records through data loader. So absurd basically means to update some existing records and to create some new records. So I'm just copy pasting it. So I'm creating one new record, and I'm going to update to existing records. So I'm changing the description. So these records like two records will be updated through absurd and one record is being created through absurd operation. So now this record is not having ID. So those records which are not having ID, they will be created the records which are having ID, they will be updated. So I'm loading the CSV. So it is info account to so moving here clicking on absurd account browse, then this one open. Next, you can see three records will be operated. Okay. Next. Then create or edit a map, then auto match. Okay. Next. Finish. Yes. So you can see the operation has fully completed. There are three successful absurd and zero errors. Okay. Now come here. So you will see one more record here under accounts. See one zero three is there. And if you open one zero one, if you go to details. So this record is updated. Now let's understand delete records through data loader. So you can delete particular records. So I'm going to delete this one. So for delete also you need to prepare CSV having ID populated. So I'm going to delete it. So I'm downloading the CSV. So this time it is info account three. Now, I need to go here, click on delete, select the object, select the CSV file, click on next initialized one record, then click on okay. Then you need to match so ID will be mapped because we are going to just delete. So if your CSV is containing only ID that is also okay, then click on finish, then yes. It is showing the warning like basis on your recycle been limit records will be there. Like overflow records will be deleted permanently. So you just need to click on yes. So you can see this operation is successful. Click on okay. Now come here. So this one zero one won't be available anymore under account. And if you want to verify it. So what you can do, you can search for recycle bin and under recycle bin your record will be available. So you can see account data one zero one is available here. Okay. Now let's understand export records through data loader. So export means whatever existing data is available you just need to export and one file will be generated automatically. So just click on export account. So choose a target for extraction. So this extract dot CSV file will be created. If you want to choose any other file you can, and you can choose the destination so I am choosing documents. Right. So in documents extract dot CSV will be available. Next, now from here you need to choose the fields. So I'm choosing account source active. So these fields I'm choosing and I'm going to choose ID as well. Right. Then here I'm applying the condition like active equals. Yes. So if this condition is matching so I'm adding this condition so you can see this as so clearly is created. So account source active alert note annual revenue ID these fields will be queried from account where active field is equals to yes. Now click on finish. So you have chosen to perform an export click yes to begin do you want to proceed. Yes. So you can see 14 records extracted successfully. If you want to view extraction. So here is the file. Right. So you can see it is having IDs by default. So at the time of update I told you like through extract you will be sorry through. So you through extract you will be having the file where IDs will be available. Now you can add it these data and you can just use this CSV for update or absurd operation. And you can find this file in your download folder or whatever folder you will be selecting when you will be demonstration you will be implementing it in your org. So I clicked on. Okay, I'm closing this. Okay. Now, you might be thinking what is the difference between export and export all. So basically, if you want to export the records which are available under the object as well as the reports which you have deleted. And those are available under recycle bin. So if you want to export both. So you can click on export all. So let me show you how it works. So I'm choosing only this field and clicking on finish. So here you can see. You have chosen to perform an export of all records, including deleted records. Click yes to begin. Do you want to proceed right so this way I hope you understood the difference between export and export all. So you can run this in your system so that you will be able to understand like how these things are working. So this is all about data loader. So I hope you understood all the operations which I demonstrated in this.