Getter error message Number of statement execution limit exceed Line:(216)

Getter error message Number of statement execution limit exceed Line:(216)

Hi, this script is giving me error message "Number of statement execution limit exceed Line:(216)". Please advise

htmlpage Pay_Period_Details(PayPeriodID,AgentID,ShowPrint,start_range,end_range)
displayname = "Pay Period Details"
content
<%{
/* Get The current Pay Period Record */
Int_Pay_Period_ID = PayPeriodID.toLong();
Current_Pay_Period_Record = Pay_Period[ID == Int_Pay_Period_ID];
Previous_Pay_Period_ID = thisapp.Application.GetPreviousPayPeriodID(Current_Pay_Period_Record.ID);
/* Checking Agent ID is a valid Agent ID */
if(input.AgentID != null && input.AgentID != "" && FormA[ID == AgentID.toLong()].count() == 1)
{
//This input parameter is a valid Agent ID
Int_Agent_ID = AgentID.toLong();
}
%>
<style>
    .centerAlign
  {
  text-align:center;
  }
  .rightAlign
  {
  text-align:right;
  }
  .rightAlignTd td
  {
  text-align:right;
  }
  .boldTd td
  {
  font-weight:bold;
  }
  .leftAlign
  {
  text-align:left;
  }
  .width33
  {
  width:33%;
  }
  .width12
  {
  width:12%;
  }
  .width8
  {
  width:8%;
  }
  .customBodyStyle
  {
  margin:10px 10px 10px 10px;
  }
  .floatRight
  {
  float:right;
  margin-right:10px;
  }
  </style>
  <style media="print">
  .pageBreakBefore
  {
  page-break-before:always;
  }
  </style>
  <div style="customBodyStyle">
<%
/* EACH AGENT CONTAINER */
Int_Start_Range = start_range.toLong();
Int_End_Range = end_range.toLong();
Total_Record_Count = FormA[ID != 0].count();
//Initilize Agent Counter
Agent_Index = 0;
for each  Agent_Record in FormA sort by Last_Name range from Int_Start_Range to Int_End_Range
{
//When Agent ID has been provided, we render only for that agent or when input agent id is not provided
//we loop for all existing agents
if(Int_Agent_ID == null || Agent_Record.ID == Int_Agent_ID)
{
Agent_Daily_Record_Count = FormB[Agent == Agent_Record.ID && Date_field >= Current_Pay_Period_Record.Start_Date && Date_field <= Current_Pay_Period_Record.End_Date].count();
// Now we have to include those agents who are either active or have atleast one record in the pay period
if(Agent_Record.Status == "Active" || Agent_Daily_Record_Count > 0)
{
//Initilize
/* Previous_Pay_Period_Payout = 0.0; */
Running_Total = 0.0;
//Determine the previous payout for the agent
//Accounting for the fact that Agent counld not have existed in the previous pay period
if(Previous_Pay_Period_ID != -1 && Pay_Period_Agent[Pay_Period_ID == Previous_Pay_Period_ID && Agent_ID == Agent_Record.ID].count() == 1)
{
//if ((Previous_Pay_Period_ID  !=  -1)  &&  (Pay_Period_Agent[(Pay_Period_ID == Int_Pay_Period_ID && Agent_ID == Agent_Record.ID)].count()  ==  1))
Previous_Pay_Period_Agent_Record = Pay_Period_Agent[Pay_Period_ID == Previous_Pay_Period_ID && Agent_ID == Agent_Record.ID];
//Previous_Pay_Period_Agent_Record  =  Pay_Period_Agent  [(Pay_Period_ID == Int_Pay_Period_ID && Agent_ID == Agent_Record.ID)];
/* Previous_Pay_Period_Payout = Previous_Pay_Period_Agent_Record.Payout; */
// Running_Total = (Previous_Pay_Period_Agent_Record.Pay_Period_Balance  -  Previous_Pay_Period_Agent_Record.Payout);
Running_Total = Previous_Pay_Period_Agent_Record.Pay_Period_Balance;
}
%>
<div
<%
if(Agent_Index > 0)
{
%>
class="pageBreakBefore"
<%
}
%>
>
<%
Agent_Index = Agent_Index + 1;
%>
<br/>
<table class="zc-viewtable zc-viewrow">
<%
if(input.ShowPrint == "False")
{
%>
<tr class="zc-grouprow">
  <td colspan="3">
Pay Period <%=Current_Pay_Period_Record.Start_Date%> to <%=Current_Pay_Period_Record.End_Date%>
</td>
</tr>
<%
}
%>
<tr class="zc-grouprow">
  <td class="width33"><%=Agent_Record.Last_Name%>, <%=Agent_Record.Name%> - <%=Agent_Record.Position%>
<%
if(input.ShowPrint != "False")
{
%>
<%
}
%>
</td>
<td class="rightAlign width33"></td>
<%
/* Previous Payout: $ <%=Previous_Pay_Period_Payout%> */
%>
<td class="rightAlign width33">Previous Balance:$ <%=Running_Total%></td>  
  </tr>
</table>
<table class="zc-viewtable">
  <tr class="zc-viewrowheader">
<th class="width12 centerAlign">Date</th>
<th class="width8 centerAlign">Sales</th>
<th class="width8 centerAlign">Front</th>
<th class="width8 centerAlign">Comm<br/>pay</th>
<th class="width8 centerAlign">Bonus</th>
<th class="width8 centerAlign">Cash<br/>Recieved</th>
<th class="width8 centerAlign">Supp/<br/>Trans</th>
<th class="width8 centerAlign">Total<br/>Cancel</th>
<th class="width8 centerAlign">Cancel<br/>comm</th>
<th class="width8 centerAlign">Bonuses<br/>Lost</th>
<th class="width8 centerAlign">Day Total</th>
<th class="width8 centerAlign">End Balance</th>
</tr>
<%
//Initilize the Day Index
Date_Index = Current_Pay_Period_Record.Start_Date;
//Initilize all Total variables
Total_Sales = 0;
Total_Commission = 0.0;
Total_Total = 0.0;
Total_Bonus = 0.0;
Total_Draw = 0.0;
Total_S_T = 0.0;
Total_Total_Cancelations = 0.0;
Total_Cancellation_1_Commission_amount = 0.0;
Total_Bonus_Lost = 0.0;
Total_Ending_Balance = 0.0;
for each  Dummy_Record in Dummy
{
//Making sure that we remain in the bounds of the pay period
if(Date_Index <= Current_Pay_Period_Record.End_Date)
{
//Account for the condition when there are no records for the agent for a given day
if(FormB[Agent == Agent_Record.ID && Date_field = Date_Index].count() > 0)
{
//In this case we pull the records from the database.
//There could be multiple day records per agent per day
for each  Agent_Day_Record in FormB[Agent == Agent_Record.ID && Date_field = Date_Index] sort by Added_Time
{
%>
<tr class="zc-viewrow rightAlignTd">
  <td class="leftAlign"><%=Agent_Day_Record.Date_field%></td>
<%
Total_Sales = Total_Sales + ifnull(Agent_Day_Record.Sales,0);
%>
<td><%=ifnull(Agent_Day_Record.Sales,0)%></td>
<%
Total_Commission = Total_Commission + ifnull(Agent_Day_Record.Commission,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Commission,0.0)%></td>
<%
Total_Total = Total_Total + ifnull(Agent_Day_Record.Total,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Total,0.0)%></td>
<%
Total_Bonus = Total_Bonus + ifnull(Agent_Day_Record.Bonus,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Bonus,0.0)%></td>
<%
Total_Draw = Total_Draw + ifnull(Agent_Day_Record.Draw,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Draw,0.0)%></td>
<%
Total_S_T = Total_S_T + ifnull(Agent_Day_Record.S_T,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.S_T,0.0)%></td>
<%
Total_Total_Cancelations = Total_Total_Cancelations + ifnull(Agent_Day_Record.Total_Cancelations,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Total_Cancelations,0.0)%></td>
<%
Total_Cancellation_1_Commission_amount = Total_Cancellation_1_Commission_amount + ifnull(Agent_Day_Record.Cancellation_1_Commission_amount,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Cancellation_1_Commission_amount,0.0)%></td>
<%
Total_Bonus_Lost = Total_Bonus_Lost + ifnull(Agent_Day_Record.Bonus_Lost,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Bonus_Lost,0.0)%></td>
<%
Total_Ending_Balance = Total_Ending_Balance + ifnull(Agent_Day_Record.Ending_Balance,0.0);
%>
<td>$ <%=ifnull(Agent_Day_Record.Ending_Balance,0.0)%></td>
<%
Running_Total = Running_Total + ifnull(Agent_Day_Record.Ending_Balance,0.0);
%>
<td>$ <%=Running_Total%></td>
  </tr>
<%
}
/*END - For each day record */
}
else
{
//There is no database record. So we dummy up a 0.0 record
%>
<tr class="zc-viewrow rightAlignTd">
<td class="leftAlign"><%=Date_Index%></td>
<td>0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ 0.0</td>
<td>$ <%=Running_Total%></td>
</tr>
<%
}
/*END - Actual Day Record(s) OR dummy up record */
Date_Index = Date_Index.addDay(1);
}
/* END - Check that Date Index remains in bounds */
}
/* END - Running Counter on Dummy Record */
%>
<tr class="zc-viewrow rightAlignTd boldTd">
<td></td>
<td><%=Total_Sales%></td>
<td>$ <%=Total_Commission%></td>
<td>$ <%=Total_Total%></td>
<td>$ <%=Total_Bonus%></td>
<td>$ <%=Total_Draw%></td>
<td>$ <%=Total_S_T%></td>
<td>$ <%=Total_Total_Cancelations%></td>
<td>$ <%=Total_Cancellation_1_Commission_amount%></td>
<td>$ <%=Total_Bonus_Lost%></td>
<td>$ <%=Total_Ending_Balance%></td>
<td>$ <%=Running_Total%></td>
</tr>
</table>
</div>
<%
}
else
{
if(!input.ShowPrint == "False" && Int_Agent_ID != null)
{
%>
<div class="centerAlign">Agent is Inactive.</div>
<%
}
/* END - Ensure that is not Print */
}
/* END - If Agent is active or has at least one day record */
}
/* END - Check on presence of Agent ID */
}
/* END - Loop on all agents on Agent Table */
/* END == EACH AGENT CONTAINER */
%>
</div>
<%

}%>


        • Recent Topics

        • Aggregate SalesIQ Knowledge Base Interactions into Zoho Desk Knowledge Base Dashboard

          Hello Zoho Desk Team, We hope you're doing well. We’d like to request a feature enhancement related to the Zoho Desk Knowledge Base dashboard and its integration with Zoho SalesIQ. 🎯 Current Limitation When customers interact with knowledge base articles
        • An Exclusive Session for Zoho Desk Users: AI in Zoho Desk

          A Zoho Community Learning Initiative Hello everyone! This is an announcement for Zoho Desk users and anyone exploring Zoho Desk. With every nook and corner buzzing, "AI's here, AI's there," it's the right time for us to take a closer look at how the AI
        • Use zoho for real estate

          Hello guys, I’m actually using a dedicated crm for real estate but it has some problems and it’s not a 100% suitable with my needs. This crm is linked to my website and is populated by an mls system (Once a colleague adds a new property this automatically goes on my crm and on my website). If there’s a match between one client’s research and one of my (or of my colleagues property) it sends a mail  to this client with the details and it should also sends some other automatic mails for birthdays,
        • calendar I created in Zoho Creator not being imported to Google calendar any longer

          A calendar that I created in my Zoho Creator app is no longer updating (or showing up at all) in my google calendar. It used to export appointments I set up in my app to google calendar. I cannot figure out how to correct this.
        • Create Encrypted Zoho Forms URL for SMS Pre-Population forms using zfcrm_entity=

          Hello Zoho Forms Community and Zoho Team, I’m trying to send a Zoho Forms URL via SMS with pre-populated CRM contact data, inspired by a post from four years ago by GlennP (https://help.zoho.com/portal/en/community/topic/passing-the-crm). Our form is
        • Passing the CRM

          Hi, I am hoping someone can help. I have a zoho form that has a CRM lookup field. I was hoping to send this to my publicly to clients via a text message and the form then attaches the signed form back to the custom module. This work absolutely fine when
        • [Important announcement] Zoho Writer will mandate DKIM configuration for automation users

          Hi all, Effective Dec. 31, 2024, configuring DKIM for From addresses will be mandatory to send emails via Zoho Writer. DKIM configuration allows recipient email servers to identify your emails as valid and not spam. Emails sent from domains without DKIM
        • Color of Text Box Changes

          Sometimes I find the color of text boxes changed to a different color. This seems to happen when I reopen the same slide deck later. In the image that I am attaching, you see that the colors of the whole "virus," the "irology" part of "virology," and
        • Condition to skip recipient signature

          Is there a way, alone or with a Zoho Form integration, to skip a recipient signature when a condition is set? This happens because in this template, not always all the recipients need to sign it. Sometimes its just a few. We are using a Zoho Form integration
        • Mail Merge Stuck in Queue

          I am trying to send Mail Merge's and it never sends out to the full list. It always hits a portion and the rest remain in the "Queue" - the emails I am sending are time sensitive, so I need this to be resolved or have a way to push the emails through
        • Is Zoho tables still being developed?

          Has this product been abandoned? I haven't seen any useful new features or stability improvements over the past six months or more. I think Tables is a great concept, filling a niche between spreadsheets and full database tools, but the current implementation
        • Zoho CRM sync

          Just wondering if the plan is for the Zoho CRM implementation to always be just an import and not a sync? At the very least, a one-way sync that kept the data in Tables up-to-date would increase the amount of usecases, but ideally the option to two-way
        • How to create a directory report from one-to-many relationship

          Hi all, Newbie here. I'm converting an Access DB to Creator. I've learned Forms are tables and Reports are used to edit table rows, not Forms. I've got the data loaded and can maintain it with the Reports already done. I've done filtering and sorting,
        • How to Delete Old Tasks/Streams Assigned by Deactivated Users? 'Operation Not Permitted' Error

          Hello, I’m using Zoho Mail and have several old tasks assigned to me in Tasks and Streams. These tasks were created by former employees whose accounts are now deactivated. When I try to delete these tasks, I get an "Operation Not Permitted" error. These
        • Profile date settings

          At present I have "EEE, MMMM dd, yyyy" but this takes an exessive amount of column space, we should be able to input our own format. I would like to use "EEE, MMM dd, yy" - a much shorter version of the above but with the same abbreviated info, requiring
        • Wich version of Backstage is included in Zoho One

          Hello I am in the event business and i am considering Zoho One to replace my current tools. I will need Backstage to manage my events but I am wondering wich version of backstage will I get if I subscribe to Zoho One. Thank you Guillaume
        • How to restore deleted campaigns?

          I accidentally deleted my first campaign that went out today (08/21/18). How do I restore it?
        • Organize and Clone Task Custom Views

          We have rolled out two new enhancements to task custom views: Custom View Groups and Custom View Clone. Custom View Groups Similar to predefined view groups, we have introduced groups for custom views to help organize and categorize them. My Custom Views:
        • Unveiling Cadences: Redefining CRM interactions with automated sequential follow-ups

          Last modified on 01/04/2024: Cadences is now available for all Zoho CRM users in all data centres (DCs). Note that it was previously an early access feature, available only upon request, and was also known as Cadences Studio. As of April 1, 2024, it's
        • Stock Count History in Product Details – Zoho Inventory

          Hello Zoho Team, When I perform a Stock Count for a product in Zoho Inventory, I would like to view the history of those stock counts later — especially from the product details page. Currently, I can perform the count and update the quantity, but I’m
        • Kits: Option to Hide Associate Items on Documents

          The new Kit type of Composite Item is very helpful, and we're already using it in several different ways. One problem is that there seems to be no way to hide the components on some documents, including Package Slips. There is an option given in settings
        • Pick List Issues

          I have created a pick list that looks at a table in a sheet, it selects the column I want fine. Various issues have come along. The option to sort the pick list is simplistic, only allows an ascending alphabetical sort. Bad luck if you want it descending.
        • Zoho Books CREDIT LIMIT is completely USELESS due to a BUG!!! Please fix it ASAP!!

          Credit Limit should not be taken into account if payment terms on the Invoice are without credit. If selected Credit 0 days (Prepayment) why in this world would a notification pop up saying credit limit is exceeded and not allowing to create an invoice?
        • Show item Cost value on Item screen

          The Item screen shows Accounting Stock and Physical Stock. It would be very helpful if value information could be displayed here as well, for instance Cost Price. Currently, to find the Cost Price (as used for inventory valuations) from inside the item
        • Show all items making up the composite item in transactions

          Dear Zoho, Currently, when we select a composite item in Zoho Inventory for a transaction, we do not receive a breakdown of the individual items that make up the composite. This makes it challenging for our team to accurately pick, pack, and ship the
        • Is it possible to adjust the web browser tab title (when a ZoHo Desk ticket is opened)

          Hi All, When I open a ZoHo Desk ticket in a web browser, the tab title (text that appears at the top of the browser tab) uses the logic: *company icon picture* (xxxx) #ticket number - company name See below (highlighted in red) for reference. Company
        • Configure ChatGPT in Zoho Cliq | Now with GPT-4!

          Updated for GPT-4 Support: The post and scripts has been revised to take advantage of the new GPT-4 model's capabilities. Please use the updated version for enhanced performance and accuracy. If you have been on the internet for the past few months, you
        • Editing the text on the Help Center home page

          Is it possible to edit the "Welcome to Help Center" message anywhere? This one: We'd like to be able to tailor it a little more ourselves.
        • Upcoming Changes to LinkedIn Parsing in Resume Extractor

          Starting 31 July 2025, the Zoho Recruit Resume Extractor will no longer support direct parsing of candidate data from LinkedIn profiles. Why Is This Change Needed? In accordance with LinkedIn’s platform policies, extracting profile data through browser
        • How to Initiate WhatsApp Message on SalesIQ?

          I've just activated a Business WhatsApp phone number through SalesIQ because of its touted omnichannel chat approach. Sounds exciting. I understand that when a customer sends me a WA message, I can reply to it on SalesIQ and keep the chat going, perfect.
        • Have completed Zoho Sign documents attach automatically to contact and/or account

          Hello, Just used ZohoSign for the first time to get an e-signature on an important document. Setting up the template was nice and easy and configuring the request to go to the right people and training a member of staff was also very easy. HOWEVER Why
        • 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
        • "In Zoho CRM, during the Blueprint transition to the QC stage, I want to make the 'Packing Proof' image field mandatory."

          @Dr Saurabh Joshi @Haiku Technical Support @Ishwarya SG @Sparrow Hill President @Hugh Marshall "In Zoho CRM, during the Blueprint transition to the QC stage, I want to make the 'Packing Proof' image field mandatory."
        • Using email "importance" as workflow-criteria

          I'd like to set up a workflow that triggers if an incoming email has been flagged as "high importance" but I'm not seeing any way to do that. Hopefully I'm just missing something obvious...?
        • Send emails directly via Cases module

          Greetings all, The ability to send emails from the Cases module, which users have been eagerly anticipating, is now available, just like in the other modules. In Zoho CRM, Cases is a module specifically designed for managing support tickets. If your organization
        • Currency transition

          We are using Zoho CRM in Curacao, Dutch Caribbean. Our currency is currently the ANG. Curacao will be transition ing from using the ANG (Antillean Guilder) to using the XCG currency (Caribbean Guilder) on March 31st 2025, see: https://www.mcb-bank.com/caribbean-guilder.
        • Update Lead Status in Zoho CRM When a Meeting is Booked via Microsoft Bookings

          Hi everyone, I’m trying to streamline our lead management process and would like to automatically update the Lead Status in Zoho CRM whenever a meeting is booked through Microsoft Bookings. Has anyone successfully implemented this kind of integration
        • How to link web sales payments through Stripe to invoices?

          I have just set up an online shop website which accepts payments through Stripe.  The payment appears in Zoho Books through the Stripe feed as 'Sales without invoices'.  In order to keep Zoho Inventory in step, I manually (for now) create a Sales Invoice
        • Zoho Website Site Speed Up & Setting

          We are experiencing slow loading speeds on our Zoho website and would like assistance in optimizing its performance. Kindly review the site and suggest or implement necessary improvements to enhance speed, especially related to: > Caching mechanisms >
        • Kaizen #199: FAQs on Multi-Select Lookup (MxN) Field in Zoho CRM

          Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone. Got
        • Next Page