Name Concatenation in Zoho CRM
Name concatenation in Zoho CRM custom module is a bit tricky method for non-technical people And it is not a default method in Zoho CRM Custom modules to capture the first and last name together in Custom Module’s Name field. So In this case, you have only one way as a non-technical person to change your form’s field from First Name and Last name to single field as Full name and then map the full name field with Zoho Module’s Name field.
But Wait, Is it really the only way? No I am gonna tell you another way that will allow you to combine your first and last name and display full name in CRM’s Custom Module Name field. So To achieve this result, We need to add a few lines of code using a Workflow in the Zoho CRM. So let’s get this done. Follow each step and you can get rid of this problem
- Log in to Zoho CRM
- Go to Settings (Click on Wrench icon given on the top right corner)
- Open Modules & Fields Link in new Tab
- Open Workflow Rules
- Create A New Rule
- Select the module in which this Workflow has to work
- Give your Workflow a Unique name & Click Next
- Now Select “On a record action” option
- Now When Do you want to Execute this rule? >> “Create or Edit” >> Repeat the Workflow – Checked >> Next
- Which “Module Name” would you like to apply the rule to? >> All Module Name >> Next
- Now In Instant Action >> Function >> Write Your Own Function >> Next
- Enter Function Name & Display Name >> Next
- Now Its time to write down the code
So you can now copy the below code and follow further steps
f = zoho.crm.getRecordById("Module_name",id); mp = Map(); mp.put("Name",f.getJSON("First_Name") + " " + f.getJSON("Last_Name")); zoho.crm.updateRecord("Module_name",id,mp);
Now Above code needs to be updated with your Custom Module Name, Fields Names etc
You can find Module Name & Fields Names from:
Go to Setup >> Developer Space > APIs >> API Names
And Copy API Names of required Module name and Module’s Field Names and change the names in the code and now its time to add the code in the writing section on workflow function screen.
Now Paste the Code there and Click On Edit Argument
Now Enter “id” in the first field and select Module ID Field from the dropdown and save the arguments
Once you saved the arguments, you now need to save the function And save your Workflow as well. So this is the whole process to auto concatenate your first and last name in a custom Zoho CRM’s Module.