How To Bulk Edit Fields In Zoho CRM

People examine the easel with calculations. Briefing and work meetup. Statistics information data

Are you struggling with updating fields in bulk in Zoho CRM? Despite being a great tool, it can be challenging to mass update fields without a major import or export. In this guide, I will show you how to map data from one field to another, such as mapping First Name and Last Name to a field called “Full Name.” However, this method can be adapted to update any fields you want. By the end of this guide, you’ll be able to easily update fields in bulk in Zoho CRM.

Get API Names

In order to make sure you are asking Zoho for the correct values you need to ensure that you have accurate API names for all of your fields. To find the API names navigate to “Settings” Select “APIs” from the Developer Space column and “API names” from the next page. 

 

 

 

Choose the module that you are wanting to bulk update records in and make a note of all the API Names for the fields you will be working with. For this example we are using “First_Name” , “Last_Name”, and “Full_Name”. 

 

 

 

 

 

Build A Custom Button 

The below deluge script would be added to your CRM through the “Modules and Fields”  pages under the “Links and Buttons” tab of the module you are editing records in. 

Create a new button and label it accordingly. For the placement select the option “List View – Mass Action Menu” (This is needed for the specific deluge function we are going to use. For the action select “Writing Function” and within the function script place the following  

				
					//Goes 5 Pages Into Records In Current View
pages = {1,2,3,4,5};
count_records = 0;
for each  page in pages
{
	contactRecords = zoho.crm.getRecords("Leads",page,100);
	// Loops through each of the records getting the requested data for each
	for each  lead in contactRecords
	{
		count_records = count_records + 1;
		lead_id = lead.get("id");
		first = lead.get("First_Name");
		last = lead.get("Last_Name”);
        fullname = first + " " + last; 	//Combines the first and last name and assigns it to a single variable
//Maps the existing field we have in the leads module called “Full_Name”	
        amap = Map();
		amap.put("Full_Name",fullname);
		update = zoho.crm.updateRecord("Leads",lead_id,amap);
		
		}
	info "PAGE NUMBER COMPLETED: " + page;
	info "RECORDS UPDATED: " + count_records;
}
return "Complete";

				
			

After creating the custom function and button, return to the list view for the relevant module. Select all the records you want to update and click the new button. However, keep in mind that this method will only work for simple updates when you are certain that the records do not already contain the correct data in the desired field. If some of the records in your selection do have the correct data, you risk overwriting it. To prevent this, you can add a conditional statement to the update function to protect your data.

Conditional Statements For Function

				
					//Goes 5 Pages Into Records In Current View
pages = {1,2,3,4,5};
count_records = 0;
for each  page in pages
{
	contactRecords = zoho.crm.getRecords("Leads",page,100);
	// Loops through each of the records getting the requested data for each
	for each  lead in contactRecords
	{
		count_records = count_records + 1;
		lead_id = lead.get("id");
		first = lead.get("First_Name");
		last = lead.get("Last_Name”);
fullname = first + " " + last; 	//Combines the first and last name and assigns it to a single variable

  if ( (Full_Name == null) 
// Use this for additional criteria: && (Field_2 != null || Field_3 != null)) 
//Remember the != is “Not Equals” m and == is “Equals” check out this to see more on relational operators 
{
//Maps to the existing field we have in the leads module called “Full_Name”	
        amap = Map();
		amap.put("Full_Name",fullname);
		update = zoho.crm.updateRecord("Leads",lead_id,amap);
		}
 }
	info "PAGE NUMBER COMPLETED: " + page;
	info "RECORDS UPDATED: " + count_records;
}
return "Complete";

				
			

In conclusion, updating fields in bulk in Zoho CRM can be a bit of a challenge, but with the right approach, it can be done with ease. By following the steps outlined in this guide, you can map data from one field to another, such as mapping First Name and Last Name to a field called “Full Name.” To ensure you’re asking Zoho for the correct values, make sure you have accurate API names for all of your fields. Additionally, by adding a conditional statement to the update function, you can protect your data from being overwritten. With these tips, you’ll be able to easily update fields in bulk in Zoho CRM and streamline your workflow.