AnsweredAssumed Answered

How to fetch all Leads for specific time duration i.e. from 2014.07.09 to 2014.07.11

Question asked by Sam Sam on Jul 11, 2014
I am using SugarCRM SOAP client in c# with version "4.0". 
I want to get all Leads created for specific duration e.g. from 2014.07.09 to 2014.07.11
I already have a code to fetch all the leads using following query and fields. But dont have idea about how to get Leads for specific duration using query fields
string[] Lead_fields = new string[] { "id", "name", "phone_home", "phone_mobile", "phone_work", "phone_other", "phone_fax", "deleted" };                    // 
                   LastSyncDateTime = ReadLastSyncDateTime();                string L_date_created = LastSyncDateTime;
                string Leads_query = "(WHERE Leads.date_entered  <= " +LastSyncDateTime + ") AND Leads.deleted = 0";
 string Leads_query = " (" + L_phone_home + " or " + L_phone_mobile + "  or " + L_phone_work + " or " + L_phone_other + " or " + L_phone_fax + ") AND Leads.deleted = 0";
                    SugarCRM.get_entry_list_result_version2 Leads_result = SugarClient.get_entry_list(Session, "Leads", Leads_query, "", 0, Lead_fields, null, 30, 0, true);
Please help

Outcomes