Copying Field Value to Another Field

[Zoho CRM] Copying Field Value to Another Field

In Zoho CRM, it is possible for you to copy a field's value to another field; given if the data type is compatible. What do we mean by this? For example, if you're looking to copy from a text field to a date field, this is not possible as the data type is not compatible. Some modifications can be done using Deluge to convert the data type so that it can be copied into another field. We will look at this in another article.

It is also possible to copy a field value from a module and paste it into another module. This opens up a lot of things that you can do in your business process. 

Note: You have to have permission by the admin and your Zoho CRM must be on Professional edition or higher to do this

To create the functions, navigate to Setup > Automation > Actions > Functions > Configure Function > Write your own. You can also create a custom function when you're creating a workflow. Once you've clicked "Write your own",  fill in the function name, display name, description (if any) and choose the module you want to copy from.

Note: the Function Name cannot contain space. Use underscore instead.


In this example, let's take the Leads module > Map Argument "leadId" to "Leads - Lead Id" by clicking "Edit Arguments" > Click Save



Then, write the code below:
  1. //get lead info
  2. leadInfo = zoho.crm.getRecordById("Leads", leadId);
  3. //get phone number
  4. leadPhone = ifnull(leadInfo.get("Phone"),"");
  5. //update Mobile field
  6. mp = Map();
  7. mp.put("Mobile", leadPhone);
  8. resp = zoho.crm.updateRecord("Leads", leadId, mp);
  9. info resp;
Yes, a non-beginner would say that this can be achieved with fewer lines, but if you're a beginner, this structure can help you understand how Deluge works better. You can slowly improve your skill as you go on.

Need any more help? Write to us at support@aplikasi.us

Cheers
    • Related Articles

    • [Zoho Desk] Mapping Dependency Field

      There are certain fields whose values depend on another field's value. This can be defined as a parent-child relationship. For example, let's say there are two fields - Country and State - in your Tickets module. The values in the State field will ...
    • [Zoho CRM] A Comprehensive Guide for Zoho CRM Wizards

      Unleashing the Power of Zoho CRM Wizards: A Comprehensive Guide What is CRM Wizards? Zoho CRM Wizards are a powerful tool designed to simplify and enhance the data entry process in Zoho CRM. They enable users to break down lengthy forms into a series ...
    • [Zoho CRM] Creating A Lead

      Leads in Zoho CRM can be created in several ways; Direct creation Import Social media connection (Facebook and Twitter) Zoho Mail integration Zoho Cliq (website ) integration To create directly, click on the '+' icon at the top right of the screen. ...
    • [Zoho CRM] How to create a function for mass action button?

      In the function you are about to write, you can edit the Arguments. Let's say for example we're dealing with the Deals module, then what you want to do is add an argument mapping to the Deal ID field. I would suggest putting the mapping value as a ...
    • [Zoho CRM] Adding business days and excluding weekends from formula field

      In Zoho CRM, or in any other Zoho apps that have a formula field, it is possible to configure it to return a date value and exclude weekends. For example, if the Opening Date of a Deal is today, I want to make the deadline for addressing it 2 days ...