on ‎2018 May 07 3:31 PM
Hi,
I want to write a beanshell to remove all baskets in year 2016. Any help?
Thanks a lot
yamen
Request clarification before answering.
Something like this?
for (o : spring.getBean("flexibleSearchService").search("select {pk} from {order} where {date} between '2016-01-01' and '2017-01-01'").getResult()) {
spring.getBean("modelService").remove(o);
}
or in Groovy
flexibleSearchService.search(/select {pk} from {order} where {date} between '2016-01-01' and '2017-01-01''/).result.each {
modelService.remove it
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, try to see if it helps
Removing Old Carts with Cronjob https://help.hybris.com/6.7.0/hcd/8c3a6caf866910148cd58d649958d7e2.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.