Create Project while winning potentials - Projects v3 api updated code

Create Project while winning potentials - Projects v3 api updated code

Hi all, I've been using the built in function to create a project while a deal is closed won and noticed it had some missing fields when trying to reference the zoho projects v3 api documentation. Specifically the project group had some issues when adding which caused me to have to change the project creation code from zoho.projects.createproject to an api call. 

Also here is the link to the api documentation for reference: Projects v3 Api Docs

I wanted to share my code in case some other people had some issues similar because this took some time to figure out and a few messages to support. A couple important notes, with the built in function I used custom field column names to populate them, with the v3 call I can reference their api names. If youre having troubles finding the custom project fields api names I used these calls in crm as standalone functions to reference them: 

  1. response = invokeurl
  2. [
  3. url :"https://projectsapi.zoho.com/api/v3/portal/[portal id]/module/[project module id]/fields"
  4. type :GET
  5. connection:"zohoprojects"
  6. ];
  7. info response;
Also to get your projects module information I did the same thing with this url: 

  1. url :"https://projectsapi.zoho.com/api/v3/portal/[portal id]/settings/modules"

Finally I will share my code for reference and some comments to show my changes, 

  1. void automation.Create_Projects_for_Closed_Potentials2(String ProjName,String PortalName,String TemplateID,String Description,Date startdate,Date enddate,String id)
  2. {
  3. /*
  4. ProjName Jobs.Jobs Name
  5. Description Jobs.Description
  6. startdate Jobs.Last Activity Time
  7. enddate Jobs.Closing Date (This can be changed will see)
  8. id Jobs.Jobs Id
  9. PortalName name of our portal - Depreciated parameter 
  10. TemplateID #########  (Template id found in template url)
  11. */
  12. createMap = Map();
  13. dealRecord = zoho.crm.getRecordById("Deals",id.toLong());
  14. descriptionText = " Job Schedule:";
  15. jobDays = dealRecord.get("Job_Days");
  16. if(jobDays != null)
  17. {
  18. descriptionText = "";
  19. moveDateRaw = null;
  20. for each  row in jobDays
  21. {
  22. d = ifnull(row.get("Day"),"");
  23. tt = ifnull(row.get("Addresses_Needed"),"");
  24. des = ifnull(row.get("Description"),"");
  25. if(moveDateRaw == null && row.get("Date_Time") != null)
  26. {
  27. moveDateRaw = row.get("Date_Time").toDateTime().toDate();
  28. }
  29. line = "Address: " + tt + "Description: " + des;
  30. descriptionText = descriptionText + line;
  31. }
  32. if(moveDateRaw != null)
  33. {
  34. createMap.put("move_date_1",moveDateRaw.toString("yyyy-MM-dd")); // Custom field api, plus strict date formatting into projects 
  35. }
  36. else
  37. {
  38. info "No valid Start_Time found in Job_Days.";
  39. }
  40. }
  41. else
  42. {
  43. info " jobDays is null. No subform data available.";
  44. }
  45. ProjName = dealRecord.get("Deal_Name");
  46. createMap.put("name",ProjName);
  47. createMap.put("description",Description);
  48. createMap.put("copy_from", TemplateID); // used to be the field "template_id"
  49. createMap.put("day",id); // custom field api name
  50. projectGroupMap = Map();
  51. projectGroupMap.put("id",######); // group id to assign project to on creation
  52. createMap.put("project_group",projectGroupMap);
  53. // Old create call, below is the new v3 api call
  54. // response = zoho.projects.createProject(PortalName,createMap,"zohooauth");
  55. resp = invokeurl
  56. [
  57. url :"https://projectsapi.zoho.com/api/v3/portal/[portal id]/projects"
  58. type :POST
  59. parameters:createMap.toString()
  60. connection:"zohoprojects"
  61. ];
  62. info "Project update response: " + resp.toString();
  63. projid = resp.get("id");
  64. if(projid != null)
  65. {
  66. updateMap = Map();
  67. updateMap.put("Project_ID",projid);
  68. updateResp = zoho.crm.updateRecord("Deals",id.toLong(),updateMap);
  69. info "Project ID stored in CRM: " + updateResp.toString();
  70. }
  71. assocMap = Map();
  72. assocMap.put("name",ProjName);
  73. assocList = List();
  74. assocList.add(assocMap);
  75. wrapper = Map();
  76. wrapper.put("data",assocList);
  77. response = invokeurl
  78. [
  79. url :"https://www.zohoapis.com/crm/v2/Deals/" + id + "/Zoho_Projects/" + projid
  80. type :POST
  81. parameters:wrapper.toString()
  82. connection:"zohooauth"
  83. ];
  84. info "CRM Respopnse: " + response.toString();
  85. }
    • Sticky Posts

    • How to Add Users to your Organization in ZohoMail?

      A better clarity so you can create other users to start using Zoho Mail. You can directly Add Users from the Control Panel to your Organization. You can invite users with the existing email address. If the person (user) already uses ZohoCRM, then you can import users from Zoho CRM. You can also import them using a .csv file. (if you are planning to add them in Bulk)  In this topic, We will be discussing on how to Add and Invite users only.  The Import options are self explanatory. ____________________________________________________________________________________________________________
    • Recent Topics

    • Zoho CRMでの商談の管理のしかたについて初歩的な質問です。

      先月からZoho CRMを試験的に導入して運用しています。 商談の管理(運用?)の仕方について教えてください。 商談の数が増えてくると、ダッシュボードの「ステージ別進捗状況」にどんどん過去の商談が蓄積されてくると思うのですが、 現在動きのあるものを中心に確認したくなる気がします。 そのあたりについては、どのように運用が一般的なのでしょうか? アドバイスいただけるととてもありがたいです。 よろしくお願いします。
    • Composite Items & Purchase Orders

      The Composite Item is great way to bundle different products and services into a single line and sell it as a single line item in Estimates, Sales Orders and Invoices. However, on the other side - i,e,. Purchasing - this item creates quite a bit of a
    • using custom function is it possible to update the created by field in Zoho Crm custom module

      using custom function is it possible to update the created by field in Zoho Crm custom module
    • Slow Sloww Slowwww Responses

      Good day, Has anyone been experiencing slow responses from support? Since Thursday I migrated my Whats app to Sales Iq and I had to synch with Social to get the otp they were sending. Apparently What's app can't be automatically added so I reached out
    • You have exceeded the maximum number of attempts for this action. Please retry doing the same in 30 minutes.

      When one of Zoho Books user tries to select a vendor, recording a new bill, these message appears: You have exceeded the maximum number of attempts for this action. Please retry doing the same in 30 minutes. Other user, at the same time, but different
    • Enable Conversation Context Retention for SalesIQ Answer Bots

      Hello Zoho SalesIQ Team, We hope you are doing well. We have noticed that SalesIQ bots currently fail to maintain conversation context in Hebrew. For example, when we follow up on a previous answer or ask for clarification in Hebrew, the bot either provides
    • Automatic Hebrew Small Talk Setup Without Duplicate Term Errors & Manual Configuration

      Dear Zoho SalesIQ Team, Greetings, We would like to request an enhancement to the Small Talk feature in Zoho SalesIQ, specifically for Hebrew language support. Current Challenge: When setting up Small Talk for Hebrew, we encounter multiple issues: Simple
    • Should I Add Leads in Bigin?

      ok, first off I'm new here. I just started using Bigin. I'm debating if it's appropriate to enter leads. by leads I mean a list of contacts that I have not yet reached out to...it's a cold calling list.  if I enter them I can track them (I understand
    • Zoho Books - Perform a validation check before an invoice is marked as sent or sent

      Allow the validation rules to apply to button actions. For example: an invoice could not be sent or marked as sent if it has an empty value in a custom field. (The field could remain blank while it is being worked on.)
    • Flow error "given url is wrong"

      when I setup a flow to update a task status, I get an error when it runs that says "given url is wrong."
    • Upgrade Zoho Desk Agent-Side Answer Bot to GenAI

      Hello Zoho Desk Team, We hope you're doing well. Following the recent announcements and rollout of the GenAI-based Answer Bot in Zoho SalesIQ (Nova '25), we’d like to formally request a similar upgrade for the Answer Bot used by agents inside Zoho Desk.
    • Bigin Android app update: Email filters enhancement, change owner for related records.

      Hello, everyone! In the most recent Bigin Android app update, we have introduced additional email filters and an option to change the owner of related records. Email filters: We have now brought in support for 'All Emails' and 'Added from Widgets' filter
    • How can I get all conversations and comments of a Zoho Desk ticket using ZOHODESK

      Hi everyone, Currently, I am developing a Zoho Desk extension, and I am following the guide available at https://www.zoho.com/desk/extensions/guide/#ticket-object. While working with Zoho Desk, I have noticed that I can only retrieve the general information
    • AI & Zoho Recruit

      Hello, I guess we all are using AI in our personal and professional lives. Now, let's imagine. Recruitment is just a succession of stages and steps. For which step would you like to see AI implemented into Zoho Recruit ? I'll start : - Automatic translation
    • widget url 404'ing

      I'm creating a widget for the first time. When I grab the url from the base url section of the widget builder and append /widget.html it 404's Just wrote a very basic test. I have a folder structure app.zip - widget.html --js/app.js /widget.html <!DOCTYPE
    • Unable to Edit Pick-List Items in Custom Project Field(s)

      I can edit most fields normally, but if I try to edit - in any way - a Pick List field, I just get this error: To be perfectly clear, I'm trying to edit an existing Pick List field (adding or removing items), not adding a new instance. If I rename it,
    • How to display results from zoho.crm.searchRecords in message window

      Hello, I've created a custom function which is linked to a custom button which pulls a date from our contacts module and searches a date field in our quotes module and returns all records matching the date. My issue is, how to I get this to display the
    • Domain Transfer

      Hello there! I wanted to know if I can transfer my domain from Zoho to other hosting providers or use a different hosting provider instead of zoho's services.
    • Select CRM Custom Module in Zoho Creator

      I have a custom module added in Zoho CRM that I would like to link in Zoho creator.  When I add the Zoho CRM field it does not show the new module.  Is this possible?  Do i need to change something in CRM to make it accesible in Creator?
    • New User - Opening Stock Aging Report

      I am setting up new client and am entering Opening Stock - created items and entered quantity/price details. Now the aging report is showing all the opening stock as new. How do I enter the Purchase Dates of these items so that I get accurate Inventory
    • Bulk Receive Multiple Purchase Orders

      Is there a feature or function that will allow you to bulk receive issued purchase orders? I have about 100 that need to be received from 5 years ago.
    • Manual Invoice

      How to create a Manual invoice, I need to enter Amount directly instead of (qty*Rate). our company is a service sector
    • Merging contacts and or accounts

      Hello, In a prior CRM we were able to merge contacts and or accounts.  We have turned on the function to stop multiple contacts with the same email, so we can prevent multiple contacts from happening, however, we now have multiple contacts that have the
    • Capture Reason for absence next to Campaign Member Status. Is there a reasonable workaround?

      I've reviewed the topics I could find to do with this but still couldn't find anything that satisfies our requirements: We would like to track a *reason* (picklist or text, doesn't matter which) why a Campaign Member (Lead or Contact associated with a
    • Zoho Learning Management System - Certificate Upload by Employees

      We are planning to enroll employees in courses which are hosted by coursera or similar sites. I want to share the links of those courses and also want employees to upload their completion certificate once they are done. Is this function possible in
    • Add RTL and Hebrew Support for Candidate Portal (and Other Zoho Recruit Portals)

      Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to set the Candidate Portal to be Right-to-Left (RTL) and in Hebrew, similar to the existing functionality for the Career Site. Currently, when we set the Career Site
    • Button or Links order

      Is there a way to re-order the buttons or links that are created?
    • 'Pin' notes, so that specific ones are always visible at the top of the 'notes' tab.

      It doesn't appear Bigin has the functionality to 'pin' a note to then have it always show at the top of the notes tab section of a record. Often times we have a large number of records, but key information we may want to have easily visible to all at
    • Request for Subform Support in Zoho CRM Webforms

      Hi Team, I hope you're doing well. I would like to bring to your attention that currently, Zoho CRM Webforms do not support Subforms, which limits our ability to send forms that mirror the actual structure used within Zoho CRM. This feature is extremely
    • Formatting Mailing Labels

      I want to use the "Print Mailing Labels" function on the drop down list, but I am not seeing a way to change the formatting on the mailing labels. At the moment, the information that appears on the mailing labels ARE NOT mailing addresses, but random
    • Maxima Address on FSM Customer

      Im trying to add probably 50 customers from one company but couldn't make it since it has limit..how do i add the limit?
    • How to Track Inventory Usage from Zoho FSM to Zoho Inventory?

      Hi everyone, We’re currently working on integrating Zoho FSM with Zoho Inventory, and we’ve encountered a challenge we’re hoping the community can help us understand better. Here’s the context: When we create a Work Order in Zoho FSM that involves parts
    • View subform entries without viewing a record in Zoho CRM | Kiosk Studio Session #8

      In a nutshell Have you ever wanted to take a quick peek at a record's subform? Examples might be invoiced items in an invoice, ordered items in a sales order, or purchased items in a purchase order. Let's say you're viewing your list of invoices in Zoho
    • Transforma tu Inventario: Control Inteligente y Funciones Clave en Zoho Inventory (Spanish Webinar)

      ¿Tu empresa necesita mayor trazabilidad y control en almacenes? Conoce cómo gestionar tu inventario con eficiencia y automatización... ¡y descubre las sorpresas que trae Zoho Analytics! Participa en nuestro webinar gratuito en español, este 19 de agosto
    • Dashlane discontinued its free plan: Here's why Zoho Vault's free plan is worth the switch

      Hey everyone, Dashlane password manager has officially announced that its free plan will be discontinued starting September 16, 2025. This change means that current free users will need to either upgrade to a paid subscription or export their data and
    • Mails are not being sent from custom Deluge function

      We are having troubles to implement sending Invoices / Sales_Orders etc. automatically using following deluge script: attachment_template_id = "aaaa"; record_id = "bbbb"; mail_template_id = "cccc"; //NEW aproach fileUrl = "https://www.zohoapis.com/crm/v8/settings/inventory_templates/"
    • Currency transition

      We are using Zoho CRM in Curacao, Dutch Caribbean. Our currency is currently the ANG. Curacao will be transition ing from using the ANG (Antillean Guilder) to using the XCG currency (Caribbean Guilder) on March 31st 2025, see: https://www.mcb-bank.com/caribbean-guilder.
    • Notes and Attachments visibility can now be restricted based on profiles

      Dear All, We hope you're well! We are here with a quick update about Notes and Attachments profile permissions. In the past, a record's Notes and Attachments were visible by default to all users with record access. However, as notes and attachments can
    • Zoho webinar--hard for agencies

      So, this is just a dive into our use case, and why we've been disappointed in Zoho webinar. We are a small marketing agency, and we wanted to add webinars to the services we provide, as many of our clients want to learn to use them as part of their content
    • Celebrating Raksha Bandhan with Zoho Desk: A Bond of Trust, Protection, and Service

      Raksha Bandhan, celebrated across India, symbolizes the sacred bond of protection and affection between siblings. “Raksha” means protection, “Bandhan” means bond or knot: together, it represents a knot of care and security. On this occasion, we'd like
    • Next Page