Zoho Books: Please ensure that the "description" has less than 100 characters.

Zoho Books: Please ensure that the "description" has less than 100 characters.

I have this code written to convert Quote into an invoice and keep getting an error even while saving the code. 

Error: Please ensure that the "description" has less than 100 characters.

  1. // Replace with your actual organization ID and connection name
  2.     org_id = "7004318259";
  3.     connection_name = "zohobooks";

  4.     // Fetch the quote details using the provided quote_id
  5.     quote_response = zoho.books.getRecordsByID("Estimates", org_id, quote_id, connection_name);
  6.     estimate = quote_response.get("estimate");

  7.     if (estimate.isEmpty())
  8.     {
  9.         info "Quote not found for ID: " + quote_id;
  10.         return;
  11.     }

  12.     // Extract key details from the quote
  13.     customer_id = estimate.get("customer_id");
  14.     zcrm_potential_id = estimate.get("zcrm_potential_id");
  15.     if(zcrm_potential_id != "" && zcrm_potential_id != null)
  16.     {
  17.         deals = zoho.crm.getRecordById("Deals",zcrm_potential_id);
  18.         What_type_of_job_is_this = deals.get("What_type_of_job_is_this");
  19.     }
  20.     estimate_id = estimate.get("estimate_id");
  21.     estimate_number = estimate.get("estimate_number");
  22.     currency_id = estimate.get("currency_id");
  23.     line_items = estimate.get("line_items");

  24.     // Initialize lists to hold Supply and Installation items
  25.     if(What_type_of_job_is_this == "Mixed Scope (Supply + Install)")
  26.     {
  27.         supply_items = List();
  28.         installation_items = List();

  29.         // Filter line items based on Item Category
  30.         for each  item in line_items
  31.         {
  32.             // Access the custom field "Item Category"
  33.             custom_fields = item.get("item_custom_fields");
  34.             item_category = "";
  35.             for each  cf in custom_fields
  36.             {
  37.                 if(cf.get("label") == "Item Category")
  38.                 {
  39.                     item_category = cf.get("value");
  40.                     break;
  41.                 }
  42.             }

  43.             // Create an item map for invoice creation, including tax
  44.             item_map = Map();
  45.             item_map.put("item_id",item.get("item_id"));
  46.             item_map.put("quantity",item.get("quantity"));
  47.             item_map.put("rate",item.get("rate"));
  48.             item_map.put("tax_id",item.get("tax_id"));
  49.             // Include tax ID (e.g., GST)
  50.             description = item.get("description");
  51.             if(description.length() > 100)
  52.             {
  53.                 description = description.subString(0,100); // Truncate to 100 characters
  54.             }
  55.             item_map.put("description",description);
  56.             // Optional: from quote, limited to 100 characters
  57.             item_map.put("unit",item.get("unit"));
  58.             // Optional: from quote

  59.             if(item_category.equalsIgnoreCase("Supply"))
  60.             {
  61.                 supply_items.add(item_map);
  62.             }
  63.             else if(item_category.equalsIgnoreCase("Installation"))
  64.             {
  65.                 installation_items.add(item_map);
  66.             }
  67.         }

  68.         // Prepare common invoice details
  69.         current_date = today;
  70.         current_date = current_date.toString("yyyy-MM-dd");
  71.         // Format for API
  72.         due_date = addDay(current_date,30).toString("yyyy-MM-dd");

  73.         // API URL for Zoho Books Invoices endpoint
  74.         base_url = "https://www.zohoapis.com.au/books/v3/invoices?organization_id=" + org_id;

  75.         // Create Supply Invoice if there are Supply items
  76.         if(!supply_items.isEmpty())
  77.         {
  78.             supply_invoice_map = Map();
  79.             supply_invoice_map.put("customer_id",customer_id);
  80.             supply_invoice_map.put("currency_id",currency_id);
  81.             supply_invoice_map.put("date",current_date);
  82.             supply_invoice_map.put("due_date",due_date);
  83.             supply_invoice_map.put("line_items",supply_items);
  84.             supply_invoice_map.put("reference_number","SUP-" + estimate_number);
  85.             supply_invoice_map.put("notes",estimate.get("notes"));
  86.             supply_invoice_map.put("terms",estimate.get("terms"));
  87.             supply_invoice_map.put("invoiced_estimate_id",estimate_id);
  88.             // Link to estimate
  89.             supply_invoice_map.put("zcrm_potential_id",zcrm_potential_id);
  90.             // CRM deal link
  91.             supply_invoice_map.put("ignore_auto_number_generation",false);
  92.             // Auto-generate invoice number
  93.             supply_invoice_map.put("is_inclusive_tax",false);
  94.             // Match your sample
  95.             supply_invoice_map.put("discount",0);
  96.             // From quote
  97.             supply_invoice_map.put("shipping_charge",0);
  98.             // From quote
  99.             supply_invoice_map.put("adjustment",0);
  100.             // From quote

  101.             // Convert map to JSON string for API
  102.             parameters_data = supply_invoice_map.toString();

  103.             // Invoke URL to create Supply Invoice
  104.             response = invokeurl
  105.             [
  106.                 url :base_url
  107.                 type :POST
  108.                 parameters:parameters_data
  109.                 connection:"zohobooks"
  110.             ];
  111.             info response;
  112.         }

  113.         // Create Installation Invoice if there are Installation items
  114.         if(!installation_items.isEmpty())
  115.         {
  116.             installation_invoice_map = Map();
  117.             installation_invoice_map.put("customer_id",customer_id);
  118.             installation_invoice_map.put("currency_id",currency_id);
  119.             installation_invoice_map.put("date",current_date);
  120.             installation_invoice_map.put("due_date",due_date);
  121.             installation_invoice_map.put("line_items",installation_items);
  122.             installation_invoice_map.put("reference_number","INST-" + estimate_number);
  123.             installation_invoice_map.put("notes",estimate.get("notes"));
  124.             installation_invoice_map.put("terms",estimate.get("terms"));
  125.             installation_invoice_map.put("invoiced_estimate_id",estimate_id);
  126.             // Link to estimate
  127.             installation_invoice_map.put("zcrm_potential_id",zcrm_potential_id);
  128.             // CRM deal link
  129.             installation_invoice_map.put("ignore_auto_number_generation",false);
  130.             // Auto-generate invoice number
  131.             installation_invoice_map.put("is_inclusive_tax",false);
  132.             // Match your sample
  133.             installation_invoice_map.put("discount",0);
  134.             // From quote
  135.             installation_invoice_map.put("shipping_charge",0);
  136.             // From quote
  137.             installation_invoice_map.put("adjustment",0);
  138.             // From quote

  139.             // Convert map to JSON string for API
  140.             parameters_data = installation_invoice_map.toString();

  141.             // Invoke URL to create Installation Invoice
  142.             response = invokeurl
  143.             [
  144.                 url :base_url
  145.                 type :POST
  146.                 parameters:parameters_data
  147.                 connection:"zohobooks"
  148.             ];
  149.             info response;
  150.         }
  151.     }
  152.     else
  153.     {
  154.         supply_items = List();

  155.         // Create an item map for invoice creation, including tax
  156.         for each  item in line_items
  157.         {
  158.             // Create an item map for invoice creation, including tax
  159.             item_map = Map();
  160.             item_map.put("item_id",item.get("item_id"));
  161.             item_map.put("quantity",item.get("quantity"));
  162.             item_map.put("rate",item.get("rate"));
  163.             item_map.put("tax_id",item.get("tax_id"));
  164.             // Include tax ID (e.g., GST)
  165.             description = item.get("description");
  166.             if(description.length() > 100)
  167.             {
  168.                 description = description.subString(0,100); // Truncate to 100 characters
  169.             }
  170.             item_map.put("description",description);
  171.             // Optional: from quote, limited to 100 characters
  172.             item_map.put("unit",item.get("unit"));
  173.             supply_items.add(item_map);
  174.         }

  175.         // Prepare common invoice details
  176.         current_date = today;
  177.         current_date = current_date.toString("yyyy-MM-dd");
  178.         // Format for API
  179.         due_date = addDay(current_date,30).toString("yyyy-MM-dd");

  180.         // API URL for Zoho Books Invoices endpoint
  181.         base_url = "https://www.zohoapis.com.au/books/v3/invoices?organization_id=" + org_id;

  182.         // Create Supply Invoice if there are Supply items
  183.         supply_invoice_map = Map();
  184.         supply_invoice_map.put("customer_id",customer_id);
  185.         supply_invoice_map.put("currency_id",currency_id);
  186.         supply_invoice_map.put("date",current_date);
  187.         supply_invoice_map.put("due_date",due_date);
  188.         supply_invoice_map.put("line_items",supply_items);
  189.         supply_invoice_map.put("reference_number",estimate_number);
  190.         supply_invoice_map.put("notes",estimate.get("notes"));
  191.         supply_invoice_map.put("terms",estimate.get("terms"));
  192.         supply_invoice_map.put("invoiced_estimate_id",estimate_id);
  193.         // Link to estimate
  194.         supply_invoice_map.put("zcrm_potential_id",zcrm_potential_id);
  195.         // CRM deal link
  196.         supply_invoice_map.put("ignore_auto_number_generation",false);
  197.         // Auto-generate invoice number
  198.         supply_invoice_map.put("is_inclusive_tax",false);
  199.         // Match your sample
  200.         supply_invoice_map.put("discount",0);
  201.         // From quote
  202.         supply_invoice_map.put("shipping_charge",0);
  203.         // From quote
  204.         supply_invoice_map.put("adjustment",0);
  205.         // From quote

  206.         // Convert map to JSON string for API
  207.         parameters_data = supply_invoice_map.toString();

  208.         // Invoke URL to create Supply Invoice
  209.         response = invokeurl
  210.         [
  211.             url :base_url
  212.             type :POST
  213.             parameters:parameters_data
  214.             connection:"zohobooks"
  215.         ];
  216.         info response;
  217.     }
    • Recent Topics

    • Zoho Books Idea - Include another field in Bank Details for Address

      Hi Books team, Currently use the Description field in the Bank Details to store the bank's address. This works fine but it would be great if you could add another field for Bank Address, so that other notes about the bank account could be stored in the
    • Reverse payment on accidentally closed invoice.

      An invoice was closed accidentally with the full payment added. However, only partial payment was paid. How can I reopen the invoice and reverse this to update it to show partial payment?
    • a question about the COQL API v8

      When I specify eight or more values in a WHERE IN clause and execute it, an error occurs. Is there a limit to the number of values that can be specified in a WHERE IN clause? ↓Error select * FROM Vendors WHERE (id in (1, 2, 3, 4, 5, 6, 7, 8, 9)) ↓Success
    • Zoho Books Idea - Bank Details Button on Banking

      Hi Books team, Sometimes I'm asked to share bank details with a customer or a colleague. So I go to the Banking Module, find the correct bank account, click Setting > Edit, then copy and paste the bank details. Wouldn't it be great if there was a button
    • JS SDK 8.0 – TypeError: Cannot read properties of undefined (reading 'getCacheStore') with sample code

      Hello Zoho Support Team, I’m integrating the Zoho CRM JavaScript SDK v8.0 and I’m getting the error below when running your official sample. I tested directly from: https://github.com/zoho/zohocrm-javascript-sdk-8.0/blob/main/samples/create_records_sample/create_records.js
    • Function #55: Convert multiple quotes to single SO using Custom Button

      Hello everyone, and welcome back to our series! In Zoho Books, after a quote is accepted by your customer, it can be converted into a sales order or an invoice. Often, a customer might have multiple quotes, and for easier billing or upon the customer's
    • Zoho One - Syncing Merchants and Vendors Between Zoho Expense and Zoho Books

      Hi, I'm exploring the features of Zoho One under the trial subscription and have encountered an issue with syncing Merchant information between Zoho Expense and Zoho Books. While utilizing Zoho Expense to capture receipts, I noticed that when I submit
    • More controls for User Fields in CRM

      Dear All, We are here with a minor but crucial enhancement to the user fields—now set accessibility permissions to the records for user field. User field allows you to extend co-ownership of records to your peers. You can collaborate with them for certain
    • Rich Text For Notes in Zoho CRM

      Hello everyone, As you know, notes are essential for recording information and ensuring smooth communication across your records. With our latest update, you can now use Rich Text formatting to organize and structure your notes more efficiently. By using
    • Time based workflow without edit/action

      Hello I need help solving this problem if possible. We have Deals come into the CRM via Live Transfer which have the field properties: Stage = New Channel = Inbound Some of them don't get answered so we want these to automatically go into our Outbound
    • What's New - August 2025 | Zoho Backstage

      Every month, Zoho Backstage grows with you. These updates aren't just features and fixes, they're about making your workday smoother, your events more impactful, and your attendees happier. We’ve listened, learned, and shaped this release to keep things
    • Introducing notifications in the vendor portal

      Imagine this: You're a recruiter working with multiple vendors on a high-volume hiring project. You’ve just updated a job description after a last-minute change from the hiring manager. One of your vendors, however, is still working off the older version
    • prevent selling expired items

      Hello. I need to make a constraint on expired batch items not to be sold. Is it possible in Zoho Inventory? if so, then how? Thanks for further help.
    • ZOHO BOOKS - EXCESSIVELY SLOW TODAY

      Dear Zoho Books This is not the first time but it seems to be 3 times per week now that the system is extremely slow. I work on Zoho Books 95% of my day so this is very frustrating. Zoho you need to do something about this. I have had my IT guy check
    • Product details removed during update from other system

      We maintain our product details in an other system. These details are synchronized with Zoho at the end of each day, through an API. This has worked perfectly sofar. But last Monday, all product codes and some other product data have been wiped during
    • Client Customer

      I purchased a customer user license, but we cannot see the project I added in the customer account. I would like to ask for support on what we should do.
    • Add Ability to Use Zoho Finance Tags

      For Zoho Finance (Books and Inventory), the current actions do not allow us to affect the tags associated with the entities in question (customers, vendors, items, etc.). Please consider adding this functionality into the actions.
    • Embeded Signing doesn't work on Safari Browser

      We have implemented Zoho Sign in our website by using embeded signing, It works perfectly on Chrome. But it fails on Safari, We get stuck on Zoho Sign Page during redirection from Zoho Sign to our website after signing the document, Please let us know
    • Dataprep Webhook Limits and Cannot update column with Dataprep

      I have two problems : 1 - I am using Airflow to trigger my pipeline, and when I tested it, it worked fine a couple of times. However, after that, I received an error: {"code":429,"message":"Request rate limited"}. I didn’t send too many requests — maybe
    • Power of Automation :: Automatic removal of project users once the project status is changed.

      A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate complex tasks and
    • New in Zoho Forms: Google reCAPTCHA v3 for smarter spam protection

      Hello form builders, Spam submissions are one of the biggest challenges when you share your forms online. They not only clutter your data but can also waste valuable time. To help you combat this without making life harder for genuine respondents, we’re
    • Project Management Bulletin: August, 2025

      We’ve touched a grand 19 years since we started pioneering project management solutions with Zoho Projects. What started as a simple one-page interface is now a suite of products with Zoho BugTracker, Zoho Sprints, and our new debut Zoho Projects Plus,
    • Zoho Sign and Zoho Workdrive Integration

      Hello, there. I want to know if it's possible to save a signed document from Zoho Sign in an specific folder for each signer in Zoho Workdrive.  For example: If John Doe signs the document in Zoho Sign I want to save it automatically in a folder named
    • Office 365 and CRM mail integration: permission required

      Has anyone run into this weird problem? My email server is Office 365. When I try to configure Zoho CRM to use this server, a Microsoft popup window opens requesting user and password. After entering that, I get a message in the Microsoft window saying
    • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

      Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
    • How do you list multiple contacts for a lead?

      My sales team wants to be able to add additional contacts for leads, how do we do that? Is there a different way we should be using the lead / contact functionality? Moderation update (9th September 2025): Our developers have built an extension to achieve
    • Modifying Three Dot Menu Options

      Is there a way to modify the three dot menu options that display in a Report header? They currently display: Show As (List, Calendar, Timeline), Print, Import, Export. I'd like to remove the Show As and Print options, since they aren't applicable for
    • Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration

      Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
    • Field Not Updating in FSM Script - Service and Parts module.

      Dear Team, I am reaching out regarding a script I have implemented in Zoho FSM to automate the calculation of the End of Service date based on the End of Sale date in the Service and Parts module. Overview of the script: Fetches the End_of_Sale__C and
    • Zadarma + Zoho CRM Integration – Missed Calls Saved as Contacts Instead of Leads

      Hello everyone, I’m looking for input from anyone with experience using the Zadarma + Zoho CRM integration. Currently, I’m seeing that missed calls are automatically being created as Contacts instead of Leads. From a CRM perspective, this doesn’t make
    • Zoho Books | Product updates | September 2025

      Hello users, We’ve rolled out new features and enhancements in Zoho Books. From PayNow payment method to applying journal credits to invoices and bills in other locations, explore the updates designed to enhance your bookkeeping experience. Integrate
    • How to update Multiple Users field in Quote Module from Deal Module

      Scenario : Deal Module having Multiple User Field (Presales Engineer) which having more than 1 User and through Deluge Script I need to get that Users Details and need to put into Multiple User Field (Presales Engineer) of Quote Module. Note: Both Module
    • Auto-sync field of lookup value

      This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
    • Clone a Module??

      I am giong to repurpose the Vendors module but would like to have a separate but very similar module for another group of contacts called Buyers. I have already repurposed Contacts to Sellers. Is it possible to clone (make a duplicate) module of Vendors
    • Advance PDF creation from CRM data

      I'm trying to create a PDF export of data in the CRM. My problem is I want a pretty complicated format for the data. I'm trying to export multiple modules worth of data, with nested one-to-many relationships between the modules. Along with that, I want
    • how to disable staff selection Zoho Booking integrated to SalesIQ?

      currently there is only one Consultant in my Zoho Bookings like this I integrate Zoho Bookings into Zoho SalesIQ to create a chatbot. Unfortunately, even though I only have one consultant for a consultation, the user have to pick the consultant. It will
    • How to change the text in WhatsApp Zobot integrated to Zoho Booking?

      I have integrated Zoho Bookings into Zoho SalesIQ, I want to change the text in WhatsApp when creating a booking in Zobot how to change those text?
    • how to differentiate if whatsapp comes from certain landing page?

      I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
    • YouTube Live #1: AI-powered agreement management with Zia and Zoho Sign

      Hi there! We're excited to announce Zoho Sign’s first YouTube live series, where you can catch the latest updates and interact with our Zoho Sign experts, pose questions, and discover lesser-known features. We're starting off by riding the AI wave in
    • Introducing Profile Summary: Faster Candidate Insights with Zia

      We’re excited to launch Profile Summary, a powerful new feature in Zoho Recruit that transforms how you review candidate profiles. What used to take minutes of resume scanning can now be assessed in seconds—thanks to Zia. A Quick Example Say you’re hiring
    • Next Page