COQL queries are one of those things that, if you take a little time to learn them, could make your life much easier when coding in the CRM.

The record search capability is more versatile and intuitive than the traditional zoho.crm.searchRecords function.

Know any SQL?

Then you’ll love this.

In this course we’ll walk through what they are and how to use them in the context of our use case: run a scheduled function to regularly update some important aggregate fields in the Accounts module. For example, take the following SQL code that spits out the total closed sales ($$) for each account in the last year. COQL makes it much easier to calculate and update this in the CRM using a scheduled function (and that’s what we’ll do)

   a."Account Name" 'Account',
   sum(d."Deal Size") 'Total $$ Last 12 Months'
FROM  Deals d
JOIN Accounts a ON a.Id  = d."Account Name"  
WHERE  d.Stage  LIKE '7 Closed Won'
 AND d."Closing Date"  > sub_date(today(), 365)
GROUP BY  'Account' 

Course Content

Expand All