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

    • Copy a Record Template from one Form to another

      I have a Creator application with several forms.  I developed a record template for one of the reports/forms but want to use most of it for another of the form/report combinations in the application. Is there a way to copy the template (code or otherwise) to another form?
    • Zoho Books - Quotes to Sales Order Automation

      Hi Books team, In the Quote settings there is an option to convert a Quote to an Invoice upon acceptance, but there is not feature to convert a Quote to a Sales Order (see screenshot below) For users selling products through Zoho Inventory, the workflow
    • Zoho Books - Include Quote Status in Workflow Field Triggers

      Hi Zoho Books team, I recently tried to create a Workflow rule based on when a Quote is Accepted by the customer. This is something which I thought would be very easy to do, however I discovered that Status is not listed as a field which can be monitored
    • When Zoho Tables Beta will be open to EU data center

      Hello all, We in EU are looking at you all using and testing and are getting jealous :) When we will be able to get into the beta also? We don't mind testing and playing with beta software. Thank you!
    • Pass current date to a field using Zoho Flow

      I am trying to generate an invoice automatically once somebody submits a record in Zoho CRM. I get an error in the invoice date. I have entered {{zoho.currentdate}} in the Date field. When I test the flow, I get "Zoho Books says "Invalid value passed
    • API: Mark Sales Order as Open + Custom Status

      Hi, it's possible to create Custom Status (sub-status actually) states for the Sales Order. So you have Open, Void. Then under Open you can have Open, and create one called Order Paid, Order Shipped, etc etc...which is grouped under Open. I can use the
    • Zoho Quartz Screen Recording

      Hello, can we get access to Quartz, please, as a standalone solution? It would be great for creating training videos for current and future staff on how to use Zoho software according to our company requirements. Thank you
    • Please add an “Auto-Apply Unused Credits” toggle

      Hello — please add a simple org-level option to automatically apply unused credits (credit notes, excess payments, retainers) to new invoices and/or bills. An ON/OFF toggle with choices “invoices”, “bills”, or “both” would save lots of manual work for
    • Tip 26: How to hide the "Submit" button from a form

      Hi everyone, Hope you're staying safe and working from home. We are, too. By now, we at Zoho are all very much accustomed to the new normal—working remotely. Today, we're back with yet another simple but interesting tip--how to hide the Submit button from your forms. In certain scenarios, you may want to hide the submit button from a form until all the fields are filled in.  Use case In this tip, we'll show you how to hide the Submit button while the user is entering data into the form, and then
    • filter broke my data

      I uploaded a file recently from Sheets and it has top 2 rows frozen, with table headers in second row and each one is filterable. somehow my first 2 columns became unfiltered and no matter what I do I cannot reapply the filter?? also didn't realize they
    • Generate a link for Zoho Sign we can copy and use in a separate email

      Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
    • Zoho Calendar soft bounce on @hotmail.com and @yahoo.com email addresses

      Hello, our Zoho calendar recently does not send the calendar invites to emails with hotmail and yahoo domains and comes back with a "soft bounce". other domains like Gmail works fine. Also sending "email" to the same emails to the above domains work well
    • Zoho Sign: need to leave document pending for up to a year, or maybe there's a better way?

      I have zoho one, maybe there's a better way to do this with another service than sending a zoho sign template from zoho crm. At the end of the day this requirement is due to regulations, no matter how dumb it may seem. I'm just looking for a way of getting
    • automations: Can I execute a step on a specific date?

      I have created a form in Zoho forms, and created a contacts list. I have also begun setting up an automation with the intention of sending the form to the contact list on a specific date every month (via email) for the entire year (essentially sending
    • how to use validation rules in subform

      Is it possible to use validation rules for subforms? I tried the following code: entityMap = crmAPIRequest.toMap().get("record"); sum = 0; direct_billing = entityMap.get("direct_billing_details"); response = Map(); for each i in direct_billing { if(i.get("type")
    • Separate Items & Services

      Hi, please separate items and services into different categories. Thank you
    • What's New in Zoho Inventory | Q2 2025

      Hello Customers, The second quarter have been exciting months for Zoho Inventory! We’ve introduced impactful new features and enhancements to help you manage inventory operations with even greater precision and control. While we have many more exciting
    • Mastering Zia Match Scores | Let's Talk Recruit

      Feeling overwhelmed by hundreds of resumes for every job? You’re not alone! Welcome back to Let’s Talk Recruit, where we break down Zoho Recruit’s features and hiring best practices into simple, actionable insights for recruiters. Imagine having an assistant
    • We are unable to process your request now. Please try again after sometime or contact support@zohoaccounts.com

      I cannot sign up and return the error of we are unable to process your request now. Please try again after sometime or contact support@zohoaccounts.com
    • Multi-currency - What's cooking ?

      Hi,       We have been doing this feature for sometime and we would like to give you some glimpses of it.  Working with Multi Currency :        Multicurrency support gives you the ability to handle business transactions in multiple currencies. You can define a base currency for your organization and add more currencies with exchange rates based on the base currency.  Setup :        From the setup page, you can manage all the currencies supported by your organization.       Currencies page        
    • Integrating Chatbot with Zoho Creator Application

      Is it possible to integrate a chatbot with a Zoho Creator application?
    • How to reduce programmatically the image uploaded by user?

      I need a function that will automatically reduce the pixel dimension to 800 x 600 pixels / 180 resolution or (approx. 1.37MB) of image uploaded by user from digital camera, for example, 2271 x 1704 pixels /180 resolution or approx. 11.1MB. After the user selected the image, the function will able to detect if pixels is above 800x600, process the photo (crop/ reduce) and resume upload. Need help...  
    • Dark mode for Zoho Creator / Zoho CRM Code editor

      Hi Team, Is there any plans for Dark mode in Zoho creator / Zoho Crm code editor and development pages in pipeline?
    • Is there a way to make a button scroll down?

      Looking to have a button on a landing page scroll down to another section on the page. Any recomendations outside of coding?
    • Collective-booking event not added to all staff calendars

      We assign two staff to certain events. When the client books this event, it adds it to one staff calendar (the 'organiser') but not the other. How can I ensure all staff assigned to a collective booking get the event in their calendar? (A side note: it
    • ZOHO Android Client

      Hi, I installed the Android app, but it had an issue, so I reinstalled it. I was able to add multiple accounts, but now when I add the next account, it just duplicates the one I already have and will not even allow me to enter the info for another account.
    • I'd like to suggest a feature enhancement for SalesIQ that would greatly improve the user experience across different channels.

      Hello Zoho Team, Current Limitation: When I enable the pre-chat form under Brands > Flow Controls to collect the visitor’s name and email, it gets applied globally across all channels, including WhatsApp, Messenger, and Instagram. This doesn't quite align
    • Enhance Barcode/QR Code scanner with bulk scanning or continuously scanning

      Dear Zoho Creator, As we all know, after each scan, the scanning frame closes. Imagine having 100 items; we would need to tap 100 times and wait roughly 1 second each time for the scanning frame to reopen on mobile web. It's not just about wasting time;
    • Is there a way to sync Tags between CRM and Campaigns/Marketing Hub?

      I wonder if there is a way to synch the tags between CRM and Marketing-Hub / Campaigns?
    • Non-depreciating fixed asset

      Hi! There are non-depreciable fixed assets (e.g. land). It would be very useful to be able to create a new type of fixed asset (within the fixed assets module) with a ‘No depreciation’ depreciation method. There is always the option of recording land
    • Managing Rental Sales in Zoho Inventory

      I am aware that Zoho Inventory is not yet set up to handle rental sales and invoicing. Is anyone using it for rentals anyway? I'd like to hear about how others have found work arounds to manage inventory of rental equipment, rental payments, etc. Th
    • Megamenu

      Finally! Megamenu's are now available in Zoho-Sites, after waiting for it and requesting it for years! BUT ... why am I asked to upgrade in order to use a megamenu? First: Zoho promised to always provide premium versions and options for all included Zoho-applications
    • Cannot access KB within Help Center

      Im working with my boss to customize our knowledge base, but for some reason I can see the KB tab, and see the KB categories, but I cannot access the articles within the KB. We have been troubleshooting for weeks, and we have all permissions set up, customers
    • Zoho Flow to Creator 3001 Respoonse

      I have updated my Flows with the new V2 connection to Zoho Creator, but now some Flows do not work. They take in data from a Webhook and are supposed to create a record in Creator, however creator returns a 3001 message along with a failure, but I cannot
    • File Upload to Work Drive While Adding Records in Zoho Creator Application

      Hi I am trying to set a file attachment field in zoho creator form, to enable the user to upload a scanned document from their local pc. The file should be uploaded to zoho workdrive and not to the default zoho creator storage. The file link should be
    • COQL order by COUNT not working

      Dear community, I am trying to get a list of deal amounts per planner working on it and sorted to get see who has the least amount of deals. For some reason, I am unable to use sort by in combination with a COUNT. My original code was: query = "select
    • Why not possible to generate?

      Using this https://desk.zoho.com/DeskAPIDocument#TicketCount#TicketCount_Getticketcountbyfield on my ZML script url :"https://desk.zoho.com/api/v1/ticketsCountByFieldValues?departmentId=XXXXXXXXXXX&accountId!=XXXXXXXXX&customField1=cf_country_1:XXXXXX&field=overDue"
    • email

      Hi My crm email is not working, can you check, I have zoho one account.
    • Need option to see Mass Emails & Cadences in Gmail Outbox OR a dedicated Zoho Outbox

      Hi everyone, Right now, when we send 1:1 emails from gmail (with gmail API connected to Zoho CRM), those emails appear both in gmail's sent folder and in Zoho CRM. That works well. But when we send Mass Emails or Cadence emails form Zoho CRM, they are
    • Integración Books para cumplir la ley Crea y Crece y Ley Antifraude (VeriFactu)

      Hola: En principio, en julio de 2025, entra en vigor la ley Crea y Crece y Ley Antifraude (VeriFactu). ¿Sabéis si Zoho va a cumplir con la ley para cumplir con la facturación electrónica conectada a Hacienda? Gracias
    • Next Page