Help in function code

Help in function code

Hi,
could someone look at the code below and tell me what 's wrong with it?
After a deal creation or edition the code should find the related Account, than all open Deals for that Account and copy the field Total_Open_Deals from the Account record to all Deals at Concurrent_deals.

Total_Open_Deals is a Rollup summary field type.

  1. cnRecord = zoho.crm.getRecordById("Accounts",input.accID);
  2. relatedDeals = zoho.crm.getRelatedRecords("Deals","Accounts",input.accID);
  3. for each  relatedDeal in relatedDeals
  4. {
  5. stage = relatedDeal.get("Stage");
  6. if(!stage.contains("Closed"))
  7. {
  8.         updateMap = Map();
  9. updateMap.put("Concurrent_deals",cnRecord.getJSON("Total_Open_Deals"));
  10. updatedConcDeal = zoho.crm.updateRecord("Deals",relatedDeal.get("id"),updateMap);
  11. }
  12. }
Thanks.
    • Sticky Posts

    • Function #46: Auto-Calculate Sales Margin on a Quote

      Welcome back everyone! Last week's function was about displaying the discount amount in words. This week, it's going to be about automatically calculating the sales margin for a particular quote, sales order or an invoice. Business scenario Where there is sales, there's also evaluation and competition between sales reps. A healthy rivalry helps to better motivate your employees to do smart work and close deals faster and more efficiently. But how does a sales rep get evaluated? 90% of the time, it's
    • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

      Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
    • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

      Problem: We use quotes which convert to sales orders but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
    • Custom Function : Automatically send the Quote to the related contact

      Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
    • Function #50: Schedule Calls to records

      Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM
    • Recent Topics

    • Zoho CRM Copilot Connectorbiz8conne

      Hello, Are the plans to release a connector for Zoho CRM and Copilot? I'm in the early research stages of potentially switching our CRM solution to Microsoft Dynamics because of its out of the box integration with Copilot. The advantage being that we
    • Approval Workflow for Purchase Orders Abrir

      The requirement is , that all purchase orders greater than or equal to 5000 go through an approval process from certain people, but within books I only see that the approvers can be by levels or any approver but we cannot enter a rule like these. Can
    • Zoho mail admin panel not opening

    • Cloning Module Customizations in Zoho FSM

      Hello Latha, I have two Zoho FSM accounts, each in a different data center. I would like to know if it is possible to clone the module customizations I have already completed in one account to my new account in the UAE from the backend. In other words,
    • is it possible to adjust the date field to show Monday as a first day

      Hi, Is it possible to adjust somewhere the date field, so the first day of the week is Monday (instead of Sunday)? Thank you! Ferenc
    • Create your own Zoho CRM homepage using Canvas - Home View!

      Hello Partners We are excited to share a new enhancement to Canvas in Zoho CRM that gives users more control over how their homepage looks and works. Introducing Canvas Home View! What is Canvas Home View? You can now create and design a custom homepage
    • can change deal colors in bigin?

      can be super useful if we can change colors deals process any way to do it?
    • Transferring Data and Double Lookup Help

      I would like to ask how I would do the following actions/codes. So I have a Budget Request Application where a User needs a request for a specific Project and lists all their needs in a subform via per-item lists. So, for my questions. 1. I have a dropdown
    • New Account, Setting up Domain Question

      Hello, I recently set up a new account with a custom domain. But after paying and setting up my account, it says OpenSRS actually owns the domain, and I have to sign up with them to host my site. But OpenSRS wants to charge me $95, which is ridiculous.
    • Canadian Banks ?

      Can you advise which Canadian Banks can be used to fully sync credit cards and bank accounts? Thanks
    • Printing receipts with 80mm thermal printer and Zoho Creator

      I have a sales form in my Zoho Creator app and I would like to print receipts for customers. Question 1: From what I've read on this forum there's no way to submit and have the receipt print automatically, you'd have to go through the printer dialog,
    • URGENT. Recovering email without eArchive

      Hello, I have deleted some email from my trash but do not have eArchive. Is it possible to recovery without this? many thanks!
    • filter on sheets mobile (iOS, iPadOS) does not work

      re-posting this as a question because reporting as a problem netted zero responses... I have this issue on every spreadsheet, whether imported or created natively in Zoho Sheets. I can use on desktop without issue: but on iOS the filter dropdowns are
    • How do you print a refund check to customer?

      Maybe this is a dumb question, but how does anyone print a refund check to a customer? We cant find anywhere to either just print a check and pick a customer, or where to do so from a credit note.
    • Zoho Books' 2025 Wrapped

      Before we turn the page to a new year, it’s time to revisit the updates that made financial management simpler and more intuitive. This annual roundup brings together the most impactful features and enhancements we delivered in 2025, offering a clear
    • US State abbreviations in Address fields

      In regards to all Address fields within Zoho, Is there a way to change the State field to be the 2 letter abbreviation vs the full spelled out US State name? Example: "Washington" should be WA. I am able to type in the abbreviated state, but it's not
    • Zoho Booking - TIN vs ATIN & ITIN

      Zoho Booking Vendors allows for TAX ID values of SSN, EIN, ATIN an ITIN. There is no option for TIN. What is the method to properly add TIN to the list of taxable values for companies? For reference: Social Security Numbers (SSN) Individual Taxpayer Identification
    • Filters and calculations for comparison of day, week to date, month to date, quarter to date and year to date of current year and prior year

      I am building a dashboard that includes reports for comparison of today and week to date (on a like-for-like basis), and month to date, quarter to date and year to date (same date basis) between current and prior years, and forecast for the current year.
    • Ability to Set Text Direction for Individual Cells in Zoho Sheet

      Dear Zoho Sheet Team, We hope you are doing well. We would like to request an enhancement in Zoho Sheet that allows users to set the text direction (right-to-left or left-to-right) for individual cells, similar to what is available in Google Sheets. Use
    • Support Bots and Automations in External Channels

      Hello Zoho Cliq Team, How are you? We actively use Zoho Cliq for collaboration, including with our external developers. For this purpose, external channels are a key tool since they work seamlessly within the same interface as all of our other channels
    • Add Flexible Recurrence Options for Meeting Scheduling in Zoho Cliq (e.g., Every 2 Weeks)

      Hello Zoho Cliq Team, We hope you are doing well. Currently, when scheduling a meeting inside Zoho Cliq, the recurrence options are limited to Daily, Weekly, Monthly, and Yearly. There is no ability to set a meeting to occur every X weeks — for example,
    • Ability to Attach Images When Reporting Issues to Zoho Projects from Zoho Desk

      Hi Zoho Desk Team, Hope you’re doing well. We’re using the Zoho Desk–Zoho Projects integration to report bugs directly from support tickets into the Zoho Projects issue tracker. This integration is extremely useful and helps us maintain smooth coordination
    • Add Comprehensive Accessibility Features to Zoho Writer

      Hello Zoho Writer Team, We hope you are doing well. We would like to submit a feature request to enhance Zoho Writer with a full set of accessibility tools, similar to the accessibility options already available in the Zoho Desk agent interface. 🚧 Current
    • Enable Screen Recording in Zoho WorkDrive Mobile Apps (Android & iOS)

      Hi Zoho WorkDrive Team, How are you? We are enthusiastic Zoho One users and rely heavily on Zoho WorkDrive for internal collaboration and content sharing. The screen-recording feature in the WorkDrive web app (similar to Loom) is extremely useful- however,
    • Make Camera Overlay & Recording Controls Visible in All Screen-Sharing Options

      Hi Zoho WorkDrive Team, Hope you are doing well. We would like to request an improvement to the screen-recording experience in Zoho WorkDrive. Current Limitation: At the moment the recording controls are visible only inside the Zoho WorkDrive tab. When
    • Add Camera Background Blur During Recording

      Hi Zoho WorkDrive Team, Hope everything is well. We would like to request an enhancement to the video recording feature in Zoho WorkDrive. Currently, the camera preview displayed during a recording does not support background blur. This is an essential
    • Properly Capture Dropdowns & Hover Elements When Recording a Window/Tab

      Hi Zoho WorkDrive Team, Hope you are doing great. We encountered a limitation when recording a selected window or browser tab: Certain UI elements, such as dropdown lists, hover menus, and overlays, are not captured unless we record the entire screen.
    • Support Uploading YouTube Videos Longer Than 60 Minutes

      Hi Zoho Social Team, How are you? We would like to request support for uploading YouTube videos longer than 60 minutes directly through Zoho Social. Your support team informed us that Zoho Social currently cannot upload videos over 60 minutes due to “API
    • can't see contact's last activity when in list view

      A contact has past activities recorded in their name. When I go to list view, no Last Activity is displaying. How do i fix this?
    • AM unable to edit my footer

      Hi, I had created my footer, was trying to reduce the width of the same, not sure what i pressed, but footer has taken over the page totally, unable to edit the footer now. cant even view the page. 
    • Bin Tracking with eBay integration

      When trying to setup bin tracking on items that are linked to eBay listings using the built-in Zoho eBay integration, I keep getting this error: "Storage Tracking cannot be enabled for items that are manually fulfiled or for serial/batch items tracked
    • Best practice to handle 50+ invokeurl calls in a loop without hitting the 30-second timeout?

      Hi everyone, I am working on a custom Deluge function where I have a Map containing around 50+ key-value pairs. I need to iterate through this Map using a for each loop and make a GET API call (invokeurl) for each item. The Problem: Because of the 50+
    • sending email with another account

      Hello there, i write there for an our costumer request. They want to send email from CRM with a different email (confirmed and added to zoho profile). For example they use account@zilium.com but with this account they want to send (not only with email
    • Check out in Meetings

      Why there is no check out in Meetings of Zoho CRM, very difficult to track
    • Read Thread Details

      Does anyone know how to "read" the complete thread details in a ticket? I figured out how to pull a summary of the threads using a webhook, but it doesn't have all the details I want. I tried to create a loop in flow, which should have worked, but instead
    • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

      Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
    • Associate ORG modules using Connected Records in Zoho CRM For Everyone

      Hello Everyone, We are here with a set of new enhancements to Connected Records in Zoho CRM For Everyone. We've made module connections clearer, easier to manage, and less confusing. What's New? Associate Org modules as Connected Records. Clear separation
    • What stops me from packaging and shipping an order when the inventory is negative?

      It seems if the inventory value is negative, that Zoho Inventory should not allow me to create a Package and Ship it.   But, there seems to be nothing to stop me from doing that other than when I go to physically package the item and realize that there is no stock. There also seems to be nothing on the screen that even indicates to me that I should not package and ship.  To me this is the fundamental point of an inventory system.  Am I doing something wrong?   
    • Zoho Show Keeps Crashing and Goes Down with the Data

      Today, I am experiencing something unusual: Zoho Show keeps crashing and goes down with the data. When you try to reopen the same deck, you get that lovely "Presentation not found" error. This has happened today rather frequently with multiple decks.
    • Let us view and export the full price books data from CRM

      I quote out of CRM, some of my clients have specialised pricing for specific products - therefore we use Price Books to manage these special prices. I can only see the breakdown of the products listed in the price book and the specialised pricing for
    • Next Page