Zoho CRM Custom Function search related records by phone number.

Zoho CRM Custom Function search related records by phone number.

We are currently using Zapier to pull in inbound/outbound text messages from Ring Central and create an activity in our CRM system.

Only problem is we are lost when it comes to creating a custom function that will associate that activity to the related records (leads, potentials). Is there a function we can use to search records by phone number?

Any help greatly appreciated. Can't find much in the CRM help book.