How can I retrieve list of opportunities whose Expected close date has been passed?
I want the list using SugarQuery.
There is no option in dateRange for something like "before today"
Use the "is not within the last" X days and set X to a very large number (we've used 30000).
Hello Hiren Darji
This query returns all opportunities whose date_closed is less to today. I've used team_security to create a query without team validation.
$sugarQuery = new SugarQuery(); $bean = BeanFactory::newBean('Opportunities'); $sugarQuery->from($bean, array('team_security' => false)); $sugarQuery->where()->lt('date_closed', '2017-06-27'); $res = $sugarQuery->execute();
Hope this help
Hi Hiren Darji
I can suggest an improvement on answer from Cesar Obed Gonzalez N.
Retrieving data ...