A little help with zoho.crm.searchRecords syntax please!
I am trying to search Campaigns using deluge in crm. I am really frustrated that the only operators are "equals" and "starts_with".... shouldn't there be a "contains"?? Ideally this solution should be a contains search of a specific field. It's a function I am setting up for an import of a large amount of data and I want to make associations/relationships. Anyhow, here is the script I have so far. I am trying to pass a variable into the conditions to search the Campaigns module based on the "Mail_Code" field we have set up. It works fine if I put specific text instead of a variable but there has to be a way to pass a variable! What's the syntax? Someone help! Everything works except the commented out line
contactId = 5122008000000796037;
contactMap = Map();
contactId = zoho.crm.getRecordById("Contacts",contactId);
mailCode = contactId.get("Legacy_Mail_Code");
info contactId;
info mailCode;
campaignMap = Map();
campaignMap0 = Map();
campaignMap0 = zoho.crm.searchRecords("Campaigns","(Mail_Code:equals:12345)");
//campaignMap = zoho.crm.searchRecords("Campaigns","(Mail_Code:equals:"+mailcode));
info campaignMap0;
info campaignMap; <--- returns nothing, what am I missing in the searchRecords syntax to use a variable vs specific text