Auto update Account information across CRM

Auto update Account information across CRM

Take a case of leads captured through web-forms. Most leads don't fill out the entire form. Once the lead is prospected, you go on to create relevant records in contact and accounts module. Now that you qualified the leads, you don't want to miss out on an opportunity to collect more details, do you? When you update these details in the accounts module, you'd want these to be automatically updated in the contacts module as well. This week's custom function helps in doing just that.

And it isn't just the Contacts module that gets updated. The related fields in any selected module, including custom modules, is auto-updated using this custom function. To apply this custom function to other modules, simply update the module names and ID in the code.

Getting started with the function:

  • Go to Setup > Automations > Actions > Functions > Configure Function > Write your own.
  • Provide a name for the function. For example: "Auto update info across CRM".
  • Select the module to be associated as Accounts. Add a description(optional).
  • Copy the code given below.
  • Click "Edit arguments".
  • Enter the name as "acctId" and select the value as "Account Id".
  • Click Save & Execute Script.
  • Save the changes.

The Code:


relatedcontacts = zoho.crm.getRelatedRecords("Contacts", ("Accounts"), accountId.toLong()); 
//info relatedcontacts; 
for each ele in relatedcontacts 
{ 
mp=map(); 
mp.put("Contact_Type", input.type ); 
update = zoho.crm.update("Contacts", ele.get("id"), mp); 
info mp; 
info update; 
}

 
    • Related Articles

    • Run duplication check across converted leads

      When you mark fields as unique in CRM, you can enable duplication check within Converted Leads as well. Consider a scenario. A sales rep in your organization has just followed up with a bunch of leads obtained from a recent tradeshow and converted ...
    • Zoho CRM: using Kanban view

      You deal with so many records in CRM every single day! When you click open each module in Zoho CRM, you have hundreds of records, each in various stages of your sales pipeline. Wouldn't it be cool if you had them all sorted automatically without ...
    • Zoho CRM: Keep your data secure

      You deal with a lot of sensitive information about your business and customers everyday. This information can't afford to go into the wrong hands and compromise data privacy. Your CRM data should be accessible only for people who work on it, and not ...
    • Some time saving tricks in Zoho CRM

      Frustrated about doing the same operation on multiple records over and over again? The Mass functions in Zoho CRM come to your rescue, letting you filter a bunch of records using a criteria to transfer, delete or convert all of them or even update ...
    • Multiple record association in Zoho CRM

      When you manage your sales data in CRM, there is often a need to link two modules. For instance, when you click on an account, you can see the contacts associated with it. As you may already know, this is achieved with the help of a Lookup field ...