recently we are hitting our API limit regularly and we have paid to increase this a few times now....
i have a script (see below) that is in every form (and also in each page in order to access a view) - we need this as we have many different clients who access the same system and we pre-populate the form with information from CRM and we use this information to also filter data depending on what system and site they belong to when they access a view (fyi - i use the customer portal to control access)
Email = zoho.loginuserid;
User_Email = zoho.loginuserid;
crmContactMatches = zoho.crm.searchRecordsByPDC("Contacts", "email", User_Email);
for each contact in crmContactMatches
{
accId = (contact.get("ACCOUNTID")).toLong();
accountResp = zoho.crm.getRecordById(("Accounts"), accId);
input.System = (accountResp).get(("Parent Account"));
siteResp = (accountResp).get(("Account Name"));
facilityResp = (accountResp).get(("Account Site"));
Site:ui.add(siteResp);
Facility:ui.add(facilityResp);
}
My question is: I presume every time a user loads a form or page that executes the script above it will count as 1 API call?
Is there a better way of doing this as i can see our API limit exceeding quickly the more users we add to our system