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

    • Hide Inactive Social Sign-In Providers from Login Screen

      Hello Zoho Team, We hope you are doing well. Currently, Zoho One allows admins to configure security policies and enable or disable Social Sign-In options for third-party providers such as Apple, Google, Microsoft, LinkedIn, Yahoo, Twitter, Facebook,
    • Zoho Cliq not working on airplanes

      Hi, My team and I have been having this constant issue of cliq not working when connected to an airplane's wifi. Is there a reason for this? We have tried on different Airlines and it doesn't work on any of them. We need assistance here since we are constantly
    • Settings Icon No Longer in ZOHO Desk?

      In ZOHO desk, there has been a gear icon for settings. as of yesterday, it is no longer there. I showed up briefly this morning but is gone again.  Anybody else experiecing this? 
    • Calls to accounts rather than leads or contacts?

      So..... We have a dilemma and I'm hoping someone has encountered this before and figured out a fix. We have just migrated to Zoho. It's great.....expect for how "Calls" are handled.... We are B2B. We do not use the leads module. A "Lead/Prospect" for
    • Adding branded signature to tickets reply

      Hi, i am unable to figure out how to add signatures with logo to tickets reply. please advice .
    • LESS_THAN_MIN_OCCURANCE - code 2945

      Hi I'm trying to post a customer record to creator API and getting this error message. So cryptic. Can someone please help? Thanks Varun
    • Sending emails from an outlook account

      Hi, I need to know if it's possible to send automatic emails from an Outlook account configured in Zoho CRM and, if so, how I can accomplish that. To give you some context, I set up a domain and created a function that generates PDF files to be sent later
    • [Free Webinar] AI Agents in Zoho Creator - Creator Tech Connect

      Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar that runs for around 45 minutes. It comprises technical sessions in which we delve deep into
    • Can Zoho Flows repeat Actions more than once?

      I'm attempting to make an intentional Zoho Flow loop using the below layout. However, when "WithinLimit" condition is met, the program fails to execute the action "Get & Add Request Co..." again. Is this by design? Is Zoho Flows unable to repeat actions
    • How to update "Lead Status" to more than 100 records

      Hello Zoho CRM, How do I update "Lead Status" to more than 100 records at once? To give you a background, these leads were uploaded or Imported at once but the lead status record was incorrectly chosen. So since there was a way to quickly add records in the system no matter how many they are, we are also wondering if there is a quicker way to update these records to the correct "Lead Status". I hope our concern makes sense and that there will be a fix for it. All the best, Jonathan
    • Ship via Carrier Not Working Since Commerce Update

      Since the recent update to the Commerce platform, I can no longer use the ship via carrier function. It will take me to the address screen and let me verify them but when I go to save and move tot he next screen it will not do anything. This is happening
    • Zoho Marketing Automation 2.0 - Landing Page function not working

      Dear Zoho Team, I am working on implementing Zoho Marketing Automation 2.0, and am now looking into the section "Lead Generation". If I open the "Landing Pages" section, I immediately get an Error code: Error: internal error occurred. Can you help me
    • 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
    • Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging

      Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
    • Image Upload Field | Zoho Canvas

      I'm working on making a custom view for one of our team's modules. It's an image upload field (Placement Photo) that would allow our sales reps to upload a picture of the house their working on. However, I don't see that field as a opinion when building
    • Zoho Expense - The ability to add detail to a Trip during booking

      As an admin, I would like the ability to add more detail to the approved Trips. At present a requestor can add flights, accommodation details and suggest their preferences. It would be great if the exact details of the trip could be added either by the
    • Simplified Call Logging

      Our organization would like to start logging calls in our CRM; however, with 13 fields that can't be removed, our team is finding it extremely cumbersome. For our use case, we only need to record that a call happened theirfor would only need the following
    • Signup forms behaviour : Same email & multiple submissions

      My use case is that I have a signup form (FormA) that I use in several places on my website, with a hidden field so I can see where the contact has been made from. I also have a couple of other signup forms (FormB and FormC) that slight differences. All
    • Adding Folders in Android App

      Is it possible to create a new email folder within the Zoho Mail Android app?  Or can this only be done from the desktop version of Zoho Mail? Cheers!
    • Schedule Exports for Regular Project Updates

      Tracking project data often means exporting data at regular intervals. Instead of manually exporting data every time, users can schedule exports for Phases, Tasks, and Tasks in Zoho Projects. These exports can be set to run once, daily, weekly, or monthly
    • Question about custom fields using Pivot Tables.

      I have created a pivot table showing annual revenue of a client and how much payment that client is paying my company. Is there a way using pivot table to add an additional field that subtracts those to fields / shows me a percentage of that difference?
    • Request for Light/Dark Mode

      Would love the ability to switch between Light and Dark mode similar to Zoho CRM. https://help.zoho.com/portal/en/community/topic/introducing-dark-mode-light-mode-a-new-look-for-your-crm
    • Signature field is showing black

      Hello, When customer signed the service form, it is showing as below picture Phone model: iPhone 16 Pro We tried delete and install application, but it not solved. This has on phone of a few person. There is any advice to solve this?
    • Range names in Zoho Sheet are BROKEN!

      Hi - you've pushed an update that has broken range names. A previously working spreadsheet now returns errors because the range names are not updating the values correctly. I've shared a video with the support desk to illustrate the problem. This spreadsheet
    • Journey Email - Ignored Contacts

      I have a journey setup which simply sends a string of emails over time. For some reason I am getting large amounts of the contacts who enter the first email being ignored and I can't find anywhere in reports or audit logs why these contacts are not
    • Involved account types are not applicable when create journals

      { "journal_date": "2016-01-31", "reference_number": "20160131", "notes": "SimplePay Payroll", "line_items": [{ "account_id": "538624000000035003", "description": "Net Pay", "amount": 26690.09, "debit_or_credit": "credit" }, { "account_id": "538624000000000403", "description": "Gross", "amount": 32000, "debit_or_credit": "debit" }, { "account_id": "538624000000000427", "description": "CPP", "amount": 1295.64, "debit_or_credit": "debit" }, { "account_id": "538624000000000376", "description":
    • Zoho Books - Include Payment Terms as a Custom View filter

      It would be great if you could created a custom view based on Payment Terms. This would be really handy for seeing a list of customers who have credit terms. A workaround is not required. I could do something with a creditor checkbox, but it would be
    • How to update changed purchase account of item in invoice

      I have selected the wrong purchase account for various articles and created invoices. I had to adjust the purchase account in the article afterwards, but the old purchase account is still posted in the transaction-journal of the invoice. To adjust the
    • Help - Zoho CRM notification on mobile (IOS/Android)

      Hello Community! Can I get the IOS/Andoid CRM app to notify me of events, calls, etc. due as I can with MANY other apps?   I am running the free Zoho I would like this to be native to the Zoho CRM app. I do not want to write a sep. mobile app
    • 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
    • Next Page