It seems that the zoho.crm.searchRecords method does not support filtering records by ID-based columns. It works fine on text columns.
I created a simple module that has a Lookup field connecting it to an Account. I also created a text field that copies the Account name into the custom module in a workflow (for testing purposes).
This works using the text field:
- devices = zoho.crm.searchRecords("CustomModule2", "(Account|=|Fake Account Name)");
This does not work:
- devices = zoho.crm.searchRecords("CustomModule2", "(Account_ID|=|2360803000001478127)");
Here's what data is returned when it works:
{"Account":"Fake Account Name","Account_ID":"2360803000001478127","CustomModule2 Owner":"My Company, Inc.","MODIFIEDBY":"236080300000011XXXX","Size":"4 Inch","SMCREATORID":"236080300000011XXXX","Control Valve Type":"Ball Valve","SMOWNERID":"236080300000011XXXX","Modified Time":"2017-06-26 14:57:00","Model Num":"ABC123","Created Time":"2017-06-26 10:20:27","Name":"Apollo 4 Inch ABC123","CUSTOMMODULE2_ID":"236080300000148XXXX","Modified By":"My Company, Inc.","Assembly Type":"RPZ","Serial Num":"0987654","Manufacturer":"Apollo","Last Activity Time":"2017-06-26 14:57:00","ID":"DEV2","Created By":"My Company, Inc.","Service Type":"PRODUCTION SUPPLY","Location":"Kitchen"}
I tried searching on other ID fields like SMCREATORID, CUSTOMMODULE2_ID, etc., but none of them work either. Only text-based columns work.
What am I doing wrong?