Assigning Teams to Projects from CRM Function Challenge

Assigning Teams to Projects from CRM Function Challenge

We have a function in our CRM that creates a Zoho Project (from a Project Template) when a particular field is updated. 

I'd like to try and assign teams to the project at that time but I can't seem to make it work. Is this possible and if so can someone help me to achieve it? 

This is our (very dumbed down) code and I would like to add in a line that assigns 2 teams to the project. I've replaced actual data with fake data obviously. Everything works fine and has for years, however I just can't seem to get the field right for assigning the teams to the project. 

I've tried users:teams, just teams, team and nothing seems to work. 

Our team  names are:
Production Team & Design Team

//PROJECT TEMPLATES AND THEIR ID FROM OUR PROJECTS MODULE
template_list = {"Project Template 1":"1112223334445556667","Project Template 2":"1112223334445556668","Project Template 3":"1112223334445556669",};
//INVOICE ID WE WANT TO USE
invoice_rec = 1112223334445556666;
//FIELDS FOR PROJECTS
Name = invoice_rec.get("Project_ID"); //This is the project template name
zuid = zoho.crm.getRecordById("users",invoice_rec.get("Owner").get("id")).get("users").get(0).get("zuid");
PortalName = "ourportalname";
type_of_project_for_template = invoice_rec.get("Type_Of_Project");
template_to_use = template_list.get(type_of_project_for_template);
template_id = template_to_use.toString();
dataMap = {"name":Name,"owner":zuid,"template_id":template_id,"teams":"Production Team"};
response = zoho.projects.createProject(PortalName,dataMap);
decoded_data = zoho.encryption.urlDecode(response);
decoded_data_map = decoded_data.toMap();
zoho_project_id = decoded_data_map.get("projects").get(0).get("id").toString();

At this point we update the Invoice in the CRM with the Project ID.

Any help would be amazing as this is driving me crazy!!

      Zoho Developer Community









                                Zoho Desk Resources

                                • Desk Community Learning Series


                                • Digest


                                • Functions


                                • Meetups


                                • Kbase


                                • Resources


                                • Glossary


                                • Desk Marketplace


                                • MVP Corner


                                • Word of the Day



                                    Zoho Marketing Automation


                                            Manage your brands on social media



                                                  Zoho TeamInbox Resources

                                                    Zoho DataPrep Resources



                                                      Zoho CRM Plus Resources

                                                        Zoho Books Resources


                                                          Zoho Subscriptions Resources

                                                            Zoho Projects Resources


                                                              Zoho Sprints Resources


                                                                Qntrl 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





                                                                            Design. Discuss. Deliver.

                                                                            Create visually engaging stories with Zoho Show.

                                                                            Get Started Now