Articles

Zoho CRM: Using a function for validation rules (or restricting specific picklist options by user profile)

What?
So this is a pretty cool feature in Zoho CRM that I hadn't used much but definitely worth an article. The ability to block field picklist options from being selected based on the profile of a user.

Why?
There were several alternatives we considered beforehand which still didn't fit the requirement: A client's first-line agents would have a lead record with the status "New Lead". The client wanted that if the status had changed to something else, the first-line agent would not be allowed to set it back to "New Lead". Automations and workflows could however (run as Administrators). Mapping a dependency field didn't fit the bill because we want "Lead Status" to be displayed to the first-line agents. Making this field read-only to first-line agents also wouldn't help as some of the options should be selectable. Two separate fields weren't quite right either: 1 as read-only (permission only to higher level) and 1 picklist as selectable means that the first-line agent would be referring to 2 status fields and not really knowing which one defines the stage the lead is at.

How?
Well this can be done through a validation rule. After working in Zoho CRM for over 3 years, this is the first time I'm using it so I'm documenting it.

Zoho CRM: searchRecords with sorted results

What?
This is an article to document how to use the searchRecords function in CRM and to sort the results response.

Why?
This is unclear and not always working as coded below since each system (CRM, Creator, Books) seems to interpret this sorting feature differently. This article is an effort to find clear and working solutions. It is working again as of 2022-02-10.

How?
Two methods listed here, the standard searchRecords() and then the getRecords() functions:

Zoho CRM: Template: Empty Space between Header and Line Items

What?
A very quick article on how to deal with an issue where a CRM template has been used and where the table of line items appears on a separate page (and to remind me of the CSS to fix this).

Why?
By default / out-of-the-box / vanilla, in a Zoho CRM Template, the table of line items will behave like this; specifically when there are a lot of line items as per my screenshot here:
Zoho CRM: Template: Empty Space Issue

How?
This has been raised a few times by multiple clients but the fix is rather quick as long as you can get to the HTML of the template:
ZohoCRM: Template: not being able to edit a text box

What?
This is a bit of an odd article with not 100% certainty on what the cause/outcome would be for your case but worked for us. This documents the steps taken to edit/modify the header on a sales order inventory template.

Why?
A client raised an issue that they had previously hard-coded the address of their organization into the body of a template (just below the header... they weren't using the header section) but then they changed address and couldn't change the template. So they had something like:
${Organization.Organization Name}
${Organization.Street}
${Organization.City}
${Organization.Country}
${Organization.Postal Code}
11 My Street, My City, My State, My Zip, My Country
They wanted to get rid of the "11 My Street, My City, My State, My Zip, My Country" but when editing the template, they couldn't put the cursor in there or even delete the box the address was in.

How?
So you're going to say this is a strange issue and an even stranger fix, but I've tested this solution by getting a colleague to refresh the page and check it out as well as the client to go in and confirm the change was successful...:
ZohoCRM & Xero Real-Time Invoices: Receive Webhook

What?
So this is an article expanding on my article Zoho Deluge - Connect to Xero API and explores how instead of a schedule, we can get Xero to tell ZohoCRM whenever an invoice or contact gets updated in Xero.

Why?
I used to use ZohoCRM schedules to pull when an invoice has been paid, but ZohoCRM schedules run only every 2 hours. You can set up 2 schedules: one that runs on even hours and one that runs on odd hours to change this to every hour. It's not enough for some, so the below details on how you can get Xero to tell Zoho when a contact or invoice has been updated immediately.

How?
Here's an overview of how we achieve this:
  1. Set up a Zoho CRM function to receive the webhook.
  2. Setup a webhook in Xero.
  3. [Optional for Method #2] Setup a PHP script on a server that will validate the Xero webhook.
You're going to need to respond to Xero with valid and invalid HTTP statuses as their webhook validation process is a little stricter than Zoho's.
Zoho CRM/Deluge: Get TimeZone Based on GeoCoded Address (Lat/Lng)

What?
An article with a quick snippet of code which builds up the address from a Lead record to geocode into latitude and longitude coordinates to feed a third-party API which returns a timezone.

Why?
Our use-case is that we have a field called "Customer's Time Zone" on the lead record in ZohoCRM. It should be auto-populated...

How?
As mentioned, we're going to use the address on the Lead record; use Zoho's GeoCode function to convert this into a latitude and longitude, then we're going to use a free TimeZone API (one that returns a timezone given a lat/lng). The added feature is that we are going to loop through picklist options (500 timezones) in CRM to select the most relevant one. If all this fails, then it defaults to a module called "States" which stores a default timezone and can be searched for with the "State" field on the Lead record.
Zoho CRM: Schedule a Task: Timesheet Reminder

What?
A quick article to demonstrate code that creates a task in CRM based on the time logged against an Event/Meeting.

Why?
As developers, we're keep account of our time and we are currently logging time in our CRM. We're meant to do 40 hours, not just for Management, but for deducting from project and support bundles.

How?
The following snippet of code is on a CRM schedule set to run every Friday at 08:00 in the morning and will create a task if time logged is too low and will remind via Popup at about 4pm (16:00).
Zoho CRM: Schedule a Call using Deluge

What?
This is an article to document how to schedule a call with a reminder in Zoho CRM using Zoho Deluge.

Why?
Because I find a need to document anything that takes longer than 30 minutes to figure out so I don't spend so long the next time I have to do it. The use-case scenario here is that when an appointment is made for a Lead in a booking system, we want a task or call in CRM to popup and remind us that we need to phone this Lead.

How?
It sounds straightforward: schedule a call using the GUI then write a test function to check the JSON that is being returned for API names...