Territory Assignment Issues (Lead to Account + Contact)

Territory Assignment Issues (Lead to Account + Contact)

1. Lead → Account & Contact Territory Assignment on Conversion

A Lead is automatically assigned one or more territories using a workflow and Lead Assignment Rules. This works as expected, and we are able to assign multiple territories to a Lead automatically.

However, when the Lead is converted into an Account and a Contact using a workflow, the newly created Account (and the corresponding Contact) does not inherit the same territories that were assigned to the Lead.

Request: Please provide the correct and supported custom function to:

- Fetch all territories assigned to the Lead
- Assign those same territories to the Account created during conversion
- Assign the same territories to the corresponding Contact created during conversion

2. Account → Contact Territory Sync When Updated Manually

As a second step, we want all Contacts under an Account to automatically inherit the Account-level territories when territories are assigned to the Account manually.

This works only when a single territory is assigned to the Account. However, as soon as multiple territories are assigned manually to the Account, all territories are removed from the Contacts under that Account.

We attempted to solve this using a workflow-triggered custom function, but it is not working reliably and keeps throwing errors.

Request: If possible, please provide a reliable custom function that performs the following steps:

- Accepts the Account ID as an input parameter
- Fetches the Account record along with all territories assigned to it
- Fetches all Contacts associated with that Account
- Assigns all Account-level territories to each Contact under that Account

    Access your files securely from anywhere







                            Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner









                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources

                                                                                              Zoho Writer

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ



                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方