Address Autofill

Address Autofill

Hi 
I'm having issues with the address autofill tutorial (https://zurl.co/rGXQ).  I have followed each step in the tutorial, but when i paste the code into a workflow/function, i'm getting the following error code:

 Improper code format Correct format : <return_type> <category>.<function_name>(<type> <arg1>, <type> <arg1>,...<type> <arg50>){ <code> }


zip = "Billing_Code";
info "data : " + data;
result = data.get("results");
mp = Map();
for each  rec in result
{
recmap = rec.toMap();
address_components = recmap.get("address_components").toJSONList();
for each  ele in address_components
{
eleMap = ele.toMap();
typeVal = eleMap.get("types");
if(typeVal.contains("locality"))
{
City = eleMap.get("short_name");
mp.put("City",City);
}
else if(typeVal.contains("administrative_area_level_1"))
{
State = eleMap.get("long_name");
mp.put("State",State);
}
else if(typeVal.contains("country"))
{
Country = eleMap.get("long_name");
mp.put("Country",Country);
}
}
}
updateResp = zoho.crm.updateRecord("Leads",leadId,mp);
info mp;
info updateResp;


* My Zip Code field API is billing_code.
*I have also omitted the API key for this post.

Can anyone help?


    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ






                              ご検討中の方