zoho-crm-api-retrieve-records-using-getsearchrecords-method-java
I would like to retrieve Leads data from my Zoho CRM based on multiple search conditions. That is, I would be filtering based on Lead Owner, Created Time and Lead Status. Manually I am able to do it directly on the site and view the filtered data. But I want to use the java api for zoho and I am not sure how to specify multiple parameters in 'searchCondition' of getSearchRecords method.The code which I am using for setting the parameters is,
String selectColumns ="Leads(Lead Owner,First Name,Last Name,Email,Lead Status)";
String newFormat = "1";
String searchCondition = "(Lead Owner|contains|*Pre*)AND(Lead Status|contains|*Contact*)AND(lastModifiedTime|>|2015-07-01 12:02:23)";
String fromIndex = "1";
String toIndex = "20";
String targetURL = "
https://crm.zoho.com/crm/private/xml/Leads/getSearchRecords";
String paramname = "content";
PostMethod post = new PostMethod(targetURL);
post.setParameter("authtoken",authtoken);
post.setParameter("scope",scope);
post.setParameter("fromIndex",fromIndex);
post.setParameter("toIndex",toIndex);
post.setParameter("newFormat",newFormat);
post.setParameter("selectColumns",selectColumns);
post.setParameter("searchCondition",searchCondition);
When I mention a single parameter in 'searchCondition', that is say only the lead owner name, I am getting the correct results. So guess the problem is in specifying multiple conditions. Kindly help. Thank you.