Why does the Decision Box field not update?

Why does the Decision Box field not update?

I have a very simple custom function to validate whether a lead is over 18 years old.  

It reads correctly, saves correctly, and gives the correct output in the log info. However it does NOT update the record. Test data should return "false" and uncheck the box. It returns as "false" but nothing happens.

The function takes 2 arguments:  DOB as date of birth, and CurrentRec as lead ID

Here's the code:
---------------------

leadrec = zoho.crm.getRecordById("Leads",CurrentRec);
DOBDecimal = DOB.getYear() + DOB.getDayOfYear() / 365;
todayDecimal = zoho.currentdate.getYear() + zoho.currentdate.getDayOfYear() / 365;
age = (todayDecimal - DOBDecimal).floor();
if(age >= 18)
{
leadrec.update("Over_18" , "true");
info "true";
}
else
{
leadrec.update("Over_18" , "false");
info "false";
}

I have tried quotes around "false" and no quotes, tried using an integration task (zoho.crm...) . Nothing. 

This needs to fire on any creation or edit of a lead record where the DOB field is not null. 

Any help please? It has to be something dumb I'm missing.

    Access your files securely from anywhere







                          Zoho Developer Community






                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts



                                                          • Sticky Posts

                                                          • 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
                                                          • Function #37: Create a Purchase Order from a Quote

                                                            Welcome back everyone! Last week, we learnt how to calculate the total number of activities for a lead and further take note of the activity count for particular dates. For instance, from the period of Demo to Negotiation. This week, let's look at a function that lets you create a Purchase Order instantly from a Quote. Business scenario: In any form of business, one of the most important things to do is to document the transactions. Naturally, negotiation, signing an agreement, placing an order,


                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources


                                                                                            Zoho Writer Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ








                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • 【Zoho CRM】 「自動メール送信」機能廃止のお知らせ

                                                                                                            ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中から、自動メール送信機能廃止についてお知らせします。 Zoho CRMの「自動メール送信」機能は2025年9月30日をもって利用できなくなります。 自動メール送信機能でフォローアップを自動化している場合は2025年6月30日までに 「ケイデンス」に移行することを強くお勧めします。 ケイデンス機能とは? 見込み客や既存顧客に対して、メール・通話・タスクなどのアクションをあらかじめ定義された順序と
                                                                                                          • Error in formula

                                                                                                            Can someone PLEASE tell me what is wrong with this formula? Formula return type, I have tried string and decimal fn.Year(fn.Now())-fn.Year(${cf_purchase_date}) I keep getting the following error. Incorrect argument type passed for function Year Thanks
                                                                                                          • Add Knowledge Base KB Articles to multiple categories

                                                                                                            Greetings,  Love you help center system.  One item that would be incredibly helpful to many of us would be able to add a single Knowledge Base KB article to multiple categories in our system.  It seems it could be quite easy to use a checkbox form, instead
                                                                                                          • Zoho Forms CRM Field Mapping

                                                                                                            Using the Zoho CRM Field in Zoho Forms, there is no direct integration between the Zoho Forms Time field, and Zoho CRM. We use this single field in most of our client-side forms to collect information. Initially reading this request, you might think that
                                                                                                          • Custom Formula

                                                                                                            Good day, I am trying to create a formula field in Zoho Desk to calculate an age, but I'm having trouble figuring out how to make the formula. This is a formula I found, but it keeps telling me the wrong field name. Can someone please help me? Field name:
                                                                                                          • COQL Query using multiple Lookup conditions causes SYNTAX_ERROR

                                                                                                            Hi everyone, I'm trying to build a COQL query that includes conditions on multiple lookup fields. Each condition works perfectly on its own — and also the condition on the Payment_Date field works fine. But when I try to combine two lookup conditions
                                                                                                          • Zoho Books | Product updates | June 2025

                                                                                                            Hello Users, We’ve rolled out new features and enhancements in Zoho Books, from the option to record advances for purchase orders to dynamic lookup fields, all designed to help you stay on top of your finances with ease. Introducing Change Comparators
                                                                                                          • Zoho Error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details

                                                                                                            Hello There, l tried to verify my domain (florindagoreti.com.br) and its shows this error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details. Screenshot Given Below -  please check what went wrong. Thanks
                                                                                                          • Zoho Books | Product updates | May 2025

                                                                                                            Hello users, We’ve rolled out new features and enhancements to elevate your accounting experience. From configuring approval at the module level to allocating landed costs to multiple bills, these updates are designed to help you stay on top of your finances
                                                                                                          • Introducing Assemblies and Kits in Zoho Inventory

                                                                                                            Hello customers, We’re excited to share a major revamp to Zoho Inventory that brings both clarity and flexibility to your inventory management experience! Presenting Assemblies and Kits We’re thrilled to introduce Assemblies and Kits, which replaces the
                                                                                                          • Beyond Email: #1 Stay in Sync with Calendar

                                                                                                            Weekly Tips: Beyond Email As we approach the International day of Productivity, we are excited to bring you something extra special! Alongside our usual weekly tips, we have curated a dedicated series focused entirely on productivity apps available within
                                                                                                          • Copying Files Between Modules

                                                                                                            Hi, I'm creating a Deluge script and I've hit a roadblock. I'm trying to copy files from one module (let’s call it Module A) into another one (Module B). Here’s what I’m doing: record = zoho.crm.getRecordById("Module_A", record_id); files_toCopy = record.get("Files_From_A");
                                                                                                          • Timeline View in CRM - a linear way to visualize records over time

                                                                                                            Hello all, We would like to introduce the next phase in our quest to deliver a seamless user experience as part of the CRM for Everyone: the Timeline View. It allows you to visualize your records plotted across a given timeline. You can view the records
                                                                                                          • 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
                                                                                                          • Zoho Flow Needs to Embrace AI Agent Protocols to Stay Competitive

                                                                                                            Zoho Flow has long been a reliable platform for automating workflows and integrating various applications. However, in the rapidly evolving landscape of AI-driven automation, it risks falling behind competitors like n8n, which are pioneering advancements
                                                                                                          • Importing New Items to be Added to Existing Item Group

                                                                                                            How to use the import sheet to import new items to be added to an existing item group. The import gives me an error that the item group name already exists and won't proceed. If it's possible, how should my import spreadsheet should look like?
                                                                                                          • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

                                                                                                            I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
                                                                                                          • Zoho Booking > Enquiry Status change automatically

                                                                                                            Hello, We have a Zoho Booking link, we want the following to happen when it is complete: 1) it finds the person in Zoho CRM who submitted the booking and updates the Enquiry Status Column to 'Self Booked'. 2) is it possible to customise the booking form
                                                                                                          • Zoho Bookings and cancellations/reschedules

                                                                                                            Hi, I noticed that when someone books, they can reschedule/cancel; on the booking page that pops up and the option is in the upper right-hand corner. Is there a way for this option to also be available in the email that the client receives?
                                                                                                          • Ability to modify what displays in calendar invite?

                                                                                                            I am a long time calendly user and want to make the switch to bookings.  I understand that there is not currently a meets/hangouts integration, is one on the roadmap? Is there anyway I can modify the calendar invite to include the meet link?  I can add it to the emails no problem, but I would also like it to display on their calendar.  Is there some work around I can do to get it on the calendar?  Also am I able to modify the calendar event title?
                                                                                                          • API question - adding a thread to an existing ticket

                                                                                                            Hi Is there an API function for the customer to add to an existing ticket thread? example, customer puts in new support ticket. support replies and ask for more details. customer replies with more details -what api function is used for this (will add record append to same ticket number?) Thanks
                                                                                                          • Bookings page very slow to load

                                                                                                            I recently switched to Zoho bookings from calendly and yesterday I switched back. Zoho Bookings page was taking 7-23 seconds to load. We were losing paid clicks from Google because they had to wait too long. Does anyone have any suggestions?
                                                                                                          • Presenting the brand new Zoho Bookings!

                                                                                                            Hello everyone, Greetings from Zoho Bookings! We're happy to announce a new version of our product with enhanced features to simplify scheduling, coupled with a sleek interface and improved privacy across teams. Here's what you can expect from the latest
                                                                                                          • Implement Meeting Polls in Zoho Bookings

                                                                                                            Dear Zoho Bookings Support Team, We'd like to propose a feature enhancement related to appointment scheduling within Zoho Bookings. Current Functionality: Zoho Bookings excels at streamlining individual appointment scheduling. Users can set availability
                                                                                                          • Zoho Bookings Issues We are facing

                                                                                                            Hi team, Here are list of issues we are facing with Zoho Bookings when migrating from other platforms. Sorry there is a lot but the bookings app need to be functional and practical for people to actually use it and not-cause MORE problems by being so basic and not customisable to each business.  1: SMS reminders for staff  There should be time limits on these reminders to make them useful. EG. if a new booking comes in more than 4 hours from now we don't really need to get a reminder, however if
                                                                                                          • Create PDFs with Text so that we can copy from a generated PDF

                                                                                                            Currently, any information that a user enters into a field cannot be highlighted and copied from the PDF that Zoho Sign renders. For example, if someone were to provide a phone number in a Zoho Sign text field, you would not be able to copy the phone
                                                                                                          • Basic String Search Not Possible in CRM Deluge – Feature Request or Workaround?

                                                                                                            Hi all, I’m trying to solve what should be a very basic automation task in Zoho CRM Deluge: Find the first 11-digit number anywhere in a string (specifically an email subject). In almost any programming language—even 1980s BASIC!—this is a trivial loop:
                                                                                                          • Email parser rule will only parse emails iwth an exact match? What madness is this?

                                                                                                            I finally got myhead around deluge and scripting, but wondered why my parser wasn't working. (https://help.zoho.com/portal/en/community/topic/extract-11-digit-number-in-any-position-from-enail-subject) Problem: There are *zero* characters or phrases that
                                                                                                          • Zoho Books API Creating Invoice and Address API

                                                                                                            I'm trying to create an invoice with zoho books api and i get the following error: Error creating invoice in Zoho Books: { message: 'Request failed with status code 400', details: { code: 15, message: 'Please ensure that the "billing_address" has less
                                                                                                          • Zoho Desk API - Influence which layout is used

                                                                                                            Hello, how can the ticket layout be changed using the API? I would like to choose the layout directly when creating the ticket. If this is not possible, my question would be how can I change it afterwards? Best regards, Sven
                                                                                                          • Zoho API Deal Creation and Pipeline

                                                                                                            I want to sync my zoho crm and backend with eachtoher, I can receive webhooks from crm and sync from it but when I try to sync to crm , I get this error for Deals module Zoho error: { data: [ { code: 'MANDATORY_NOT_FOUND', details: [Object], message:
                                                                                                          • Is there a way to disable the Activity Reminders Pop-Up Window every time I log in?

                                                                                                            Just wondering if there is a setting to disable the window from opening every time I open my CRM? Thanks Chris
                                                                                                          • Transfer to agent not working on flutter app after integration

                                                                                                            [media pointer="file-service://file-LF6KAwkyDJNd6MbzZmctS3"] [media pointer="file-service://file-FN66XQUngquBJGLdrS827u"] +7 -2 Lines changed: 7 additions & 2 deletions Original file line number Diff line number Diff line change @@ -1,10 +1,11 @@ import
                                                                                                          • Zoho Voice VS in Zoho CRM for logging calls

                                                                                                            I don't understand the differences between logging calls in Zoho Voice VS in Zoho CRM. Why the 2 separate platforms? Seems confusing
                                                                                                          • Comment Templates

                                                                                                            Is it possible to add a template option for comments? We have some agents in the process who's responses require a pre-formatted layout. It would be incredibly handy to have a template for them where they can insert the template and then add their responses
                                                                                                          • Custom Function to Update Ticket based on Subject of Ticket

                                                                                                            This may be pretty simple but I'm having issues with getting a custom function to fill out custom fields based on the subject of a ticket and not the body of a ticket. Basically we need to fill in the PO number and Item ID custom fields, both of this
                                                                                                          • Is it possible for using Zoho Creator as a public application without login?

                                                                                                            Hi there, I recently had a client who was looking at building a learning resource on Zoho Creator. However he had a requirement that course content that he builds may be publicly accessible. My question is that, is it possible to have public pages with
                                                                                                          • Dashboard won't save, nor allow me to do a "save as"

                                                                                                            For some reason, one of my dashboards won't let me make any modifications to it and save?  I get the "do you want to save before closing?' and I say yes and the dialogue box just stays there.  I try to do a "save as" right after I open that dashboard and I get the dialogue box that seems to let me name the new dashboard, but it won't let me save.  The dialogue box just stays there unless I hit cancel or no. Can you please help? Jamie
                                                                                                          • Zoho Blog from Zoho Sites

                                                                                                            I keep receiving this error after trying to edit blog posts that were previously saved for posting at a later date: Additionally, I try to make new posts and they show this message, "Failed to save".
                                                                                                          • Unable to make calls at the moment.

                                                                                                            One of our employees has been getting this message all day when trying to make an outgoing call. We use the zoho phone bridge, and all other employee calling works as intended. 
                                                                                                          • Next Page

                                                                                                          OSZAR »