Books Custom function - Not executing..

Books Custom function - Not executing..

Use case :
Module involved = Invoice
When an Invoice is "Approved", the "current date" is more than "n" days and the "Amount" to be received is more than 0
I want a cliq message to be triggered in a channel and to be executed Daily(Scheduled) at 10:30 am.
That is only if it meets the condition.

I have a custom function written. But daily it is giving an error (failure) when it gets executed.

I am attaching the script. Can anyone help me? I have contacted the ZOHO team n number of times and so far the team have not come out with any solution.
________________________

organizationID = organization.get("organization_id");
invoiceID = invoice.get("invoice_id");
invoicenumber = invoice.get("invoice_number");
StatusF = invoice.get("status_formatted");
Status = invoice.get("status");
SalesPersonaname = invoice.get("salesperson_name");
CustName = invoice.get("customer_name");
invoicededate = invoice.get("date");
invoiceBalance = invoice.get("balance");
Currencycode = invoice.get("currency_code");
invodateplus3days = invoicededate.addDay(3);
// can add any nuymber of days within bracket (3)
tday = zoho.currentdate;
Daydiff = invoicededate.daysBetween(tday);
info Daydiff;
info invoicededate;
info invodateplus3days;
info tday;
info invoicenumber;
info StatusF;
info Currencycode;
info invoiceBalance;
if(StatusF.containsIgnoreCase("Approved") && invoiceBalance >= 0 && Daydiff > 3)
{
Message = "Hi, Dear " + " " + " Prabhu (accountant), Balance of " + " " + Currencycode + invoiceBalance + "." + "  Looks like though Approved /Sent/Invoiced, payment either not received or details not marked  It is " + " " + Daydiff + " " + "days " + " " + invoicenumber + " " + StatusF + " " + " M/s " + CustName + ". " + "" + " Can obtain details if any, from the Salesperson " + " " + SalesPersonaname + " " + "Thanks.";
response = zoho.cliq.postToChannel("arbhuaccounts",Message,"invoicemsgcliq");// msg to be sent to two channels
response = zoho.cliq.postToChannel("aktest",Message,"invoicemsgcliq");               //msg to be sent to two channels
}
else if(StatusF.containsIgnoreCase("Over") && Daydiff > 3)
{
Message1 = "Hi " + " " + SalesPersonaname + " " + invoicenumber + " " + CustName + " " + "overdue by  " + "" + Daydiff + " " + "Days. Please send reminder or chase for the payment ";
response = zoho.cliq.postToChannel("arbhuaccounts",Message1,"invoicemsgcliq");
}

_____________________________________________


    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ






                              ご検討中の方

                                • Recent Topics

                                • acc

                                  Regularly sending statements to customers is an imperative part of many business processes as it helps foster strong customer relationships and provides timely guidance on pay//
                                • South African Payment Gateways

                                  Since the "Demise" of Wave many South African users have moved over to Zoho and yet for years users have been requesting Integration with a South African Payment Gateway to no avail. Payfast was the most commonly requested gateway as it supports recurring
                                • CRM Implementation

                                  I need to implement Zoho CRM. Is there a useful user manual available to guide me through the implementation?
                                • Zoho Social integration with Zoho Flow

                                  Is there any plans for Zoho Social integration with Zoho Flow?
                                • Marketing 2.0 has been a catastrophe

                                  Anyone else having significant issues with their link between their CRM and Marketing automation since moving to version 2.0? We had an easy flow for triggering leads in the CRM to journeys in Marketing Automation but now nothing seems to work properly.
                                • Cannot average "Duration (Time)" from Pick List History Tracking in Reports

                                  Okay, let's say I have a custom module. In this custom module I have a pick-list named "Status" with "New", "In-Progress", "Completed" values. I also have turned ON pick-list history tracking and chose "Time" to track the duration in (instead of "Calendar
                                • Customer Statement Template

                                  Hi. how can i add order number "customer LPO number" in the customer statement. regards
                                • Authorize.Net Update: Disable Transaction IP Velocity Filter to Avoid Payment Failures

                                  Update: The Authorize.Net integration was updated on November 20, 2024. To prevent recurring transaction failures, we recommend disabling the Transaction IP Velocity Filter at the earliest. We’re updating the Authorize.Net integration in Zoho Books on
                                • Need to send a single email to up to 20 recipients

                                  I want to send a single email to ~16 or 20 recipients. It appears that I cannot do this in Zoho email as it gets flagged as unusual activity. I need to be able to communicate with this group on a regular basis. What am I missing that Zoho doesn't allow
                                • Unable to Schedule One-to-One Emails in Zoho CRM

                                  Hi everyone, I’m using the Zoho CRM Professional Edition and facing an issue with scheduling one-to-one emails directly from CRM. While I can send immediate emails without any problem, I don’t see an option to schedule these emails for a later time. I’ve
                                • Canvas Detail View Related List Sorting

                                  Hello, I am having an issue finding a way to sort a related list within a canvas detail view. I have sorted the related list on the page layout associated with the canvas view, but that does not transfer to the canvas view. What am I missing?
                                • Repeatable Fields/Sections in Zoho CRM

                                  Hi Zoho Team, We have a module in CRM named "Clients". We would like to know whether it is possible to have a feature enables us to have repeatable sections in our clients' profiles? For example, if we customized a section in the clients' profiles named
                                • Zoho Analytics: Requests for view access

                                  Hello, We have a user that might request access to a certain view, report etc. However this request for access is being sent to different admins within the workspace, is is possible to set who the "approver" is of these requests? If not what are the rules
                                • Boolean Fields in Mail Merge Displaying as Checkmarks

                                  I'm really liking the new mail merge functionality. It's replaced the Zoho Sign extension for us. One problem I've seen is that boolean operators (i.e. Checkbox fields) in CRM merge as "True" or "False". This looks a little ugly in my final document — is there a way I can get those to display as checkboxes?
                                • Formula in Sub Form

                                  Hello - I have created a sub-form and the data is going to be insurance policy information. However some of the policy amounts are based on a percentage of a main coverage. For example, Debris removal coverage is 5% of the main dwelling policy. Is there
                                • Email alias already exist

                                  Hello, I'm getting an error message the email alias already exist when attempting to add 2 email addresses. The emails are associated with an account I deleted. I started a new account and need to add them back to get 1 email at each. I have an open ticket
                                • Migrate emails from a shared mail box to a private mail box

                                  How is possible migrate a shared mail box if the migration tool require a password, and the shared mail dosent have ?
                                • Support poor service

                                  I just wanted Zoho support to give me some more concrete answers. I’m facing SMTP error issues, and they told me that the South American IP was experiencing problems, but they didn’t provide an estimate for when it would be resolved. Now my company is
                                • Zoho say my domain seems to be already associated with another account

                                  I created a zoho account for try my domain mail configuration. When I want to add my domain in this page https://mailadmin.zoho.com/hosting?plan=free then this shows an error that is "This domain is already associated with this account a*****n@f*****."
                                • Incorrect Device Time

                                  Hi On my windows laptop I can't sign into Zoho mail due to "incorrect device time". I'm in Toronto, Canada. How can this be resolved?
                                • Get user images by API

                                  Hi For our internal management software, I want to retrieve user photos via REST API: curl --location --request GET 'https://profile.zoho.com/file?fs=thumb&ID=<zoid>' \ --header 'Authorization: Zoho-oauthtoken <token>' The token has `profile.userphoto.ALL`,
                                • Depois de 1 ano não consigo receber e-mail

                                  Consigo enviar e-mails mas não estou recebendo nenhum e-mail isso aconteceu pontualmente após eu completar 1 ano de uso. Me ajudem por favor
                                • Submitted form URL

                                  I am using the feature "Include a link to allow respondents to edit their responses" for the first time. This URL is included in the email sent to the user after they press Submit. If a form is Saved, there is a section called Partially Saved Entries
                                • API to post drafts for social media

                                  I we want to post draft posts to our zoho social account and then approve and schedule them within Zoho social. is this possible with for example: https://apis.zoho.com/social/v2/post TIA Jon
                                • Function for Emails tranfer from Lead to Deal

                                  Hi Due to the fact that my Deals conversion needs to be done in 2 ways - depending on the fact if those records already exists or not - resources in fields are different. I am making function control conversation for Leads but I have problem with transferring
                                • Create a new immigration service- Similar to immigration law software

                                  It will be good if you can build a new service. Data will be pulled from the employee form. Then automatically users should be able to complete immigration forms like I 129, ETA 9089, ETA 9035 E, G- 28, W4, I 9 PDF forms and then be able to send for signature with Zoho sign. Immigration Softwares like docketwise can be used for ideas. The advantage with this it sits within Zoho people and employees don't have to feed data in another system
                                • Accessibility in Zoho CRM: Not just a feature—a way to empower

                                  For instructions on setting up these controls, please check this help document: Configuring accessibility controls. Hello everyone, Today (December 3, 2024), on the International Day of Persons with Disabilities, we begin our journey towards a CRM that
                                • Zoho Meeting very bad video quality

                                  Hello, I need 1080p HD on my Zoho Meeting as explained here: Low Resolution/Quality Video (zoho.com) Currently, video quality is lagging with 400mb internet which is not acceptable for my business. My 1080p 60FPS webcam performs well on platforms like
                                • Contacts with Deals not appearing.

                                  What: I simply want to see all of the contacts that are tied to an open deal Problem: In Contacts Module > When filtering on Contacts with an open deal, Zoho only shows some Contacts instead of all. Details: More specifically, I should have ~200 contacts
                                • 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.
                                • CRM limit reached: only 2 subforms can be created

                                  we recently stumbled upon a limit of 2 subforms per module. while we found a workaround on this occasion, only 2 subforms can be quite limiting in an enterprise setting. @Ishwarya SG I've read about imminent increase of other components (e.
                                • Version of Cliq included with Zoho One and Limitations

                                  I'm confused by the information presented in the application detail page of Zoho One. I'm a solopreneur with a single-seat Zoho One Enterprise license and I need to communicate externally .. extensively. The plan details page suggests channels are limited to 100 members. Whereas the pricing plan comparison page on the Cliq marketing site says 2500 for enterprise level.  If it's 100... that's going to kill my use case as it is my understanding that external customers can only be communicated with
                                • Resubmit for Approval for Zoho Books Module in CRM

                                  The integration between CRM and Books is great, but it is incomplete in many areas. One of them is if an estimate/invoice/sales order is rejected, the users in CRM cannot resubmit it for approval. Let's face it, sales people will mostly be in CRM and
                                • Upload edited meeting recording for attendees to download

                                  Hi Would it be possible to let meeting organisers upload an edited version of the meeting recording? Usage case: most of us probably start a meeting 15 minutes before the official start time. It would be nice to trim that dead time off the recording.
                                • Why does the embed feature within the article editor seem to be not functional?

                                  I would like to embed media into an article, but that feature seems to be non-functioning. Am I doing something wrong? to clarify, I do not want to create an article by embedding. I want to embed media into an article I have created in a manual.
                                • Get all fields using COQL

                                  Hi Is it possible to get all the fields of a record using COQL?. Something similar to select * from Accounts in SQL.
                                • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

                                  Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
                                • Can it change the language ?

                                  Hello ! The question is in the title ;) 
                                • Notes and Notebook integration

                                  Maybe I missed it, but is there a way to synch notes in the desktop with the notes in the Notebook app? I've been combing through the help topics and other forum entries and not finding anything. When I downloaded the android app I assumed there was integration with the desktop notes. Is that not the case? thanks.
                                • Tags on notes aren't syncing correctly on Android

                                  I've created notes on the desktop version that have several tags assigned, but on both my Android devices those notes only have ONE of those tags instead of all of them, despite the actual content of the note being correctly synced, and I'm also starting
                                • Next Page