Adding Account tags to associated Project

Adding Account tags to associated Project

Hello,

I am trying to edit a function that I created to also pass along the account Tag to its associated project. 

The function I created below is used to create and associate a project to its account (I created a workflow to kickoff this function once the field "order number" contains a value):

//acctId = acctId.ToLong();
id = "raiment";
mp = Map();
mp.put("name",businessName + ": " + orderNumber);
mp.put("template_id",1936048000000054005);
mp.put("start_date",zoho.currentdate.toString("MM-dd-yyyy"));
mp.put("owner",773544597);
created = zoho.projects.createProject(id,mp,"projects");
info created;
projectid = created.get("projects");
for each  rec in projectid
{
projid = rec.get("id");
projname = rec.get("name");
}
mp = Map();
mp.put("name",projname);
contdet = Map();
contdet.put("id",acctId);
mp.put("accounts",contdet.tolist());
datalist = List();
datalist.add(mp);
datamp = Map();
datamp.put("data",datalist);
resp = invokeurl
[
url :"https://www.zohoapis.com/crm/v2/Accounts/" + acctId + "/Zoho_Projects/" + projid
type :POST
parameters:datamp.toString()
connection:"projects"
];
info resp;


.................................................
Along with the account name/order number I'd like to pass the Tags that are on the accounts to also appear on the Project.
    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 コンテンツ




                              ご検討中の方