Posts: 57
Threads: 14
Joined: Jun 2020
Reputation:
10
Hello,
We have a need to filter out products (and later detele them) which were not used (not active, were not quoted, not ordered and not sold).
Would it be possible to do this through interface?
Is it possible to have custom filter condition witch looks if the product has any relation?
Thanks
Posts: 102
Threads: 37
Joined: Apr 2018
Reputation:
50
Since those are not directly related i don't see how you could display them in filters. Maybe if you get those values in some custom fields on products you could then filter on those.
Posts: 3,565
Threads: 36
Joined: Apr 2014
Reputation:
49
There is currently no way to do that (yet). It is something that has appeared in the past but we have never gotten to it.
I usually just get the IDs from the database and use them to delete the products either with a web service loop if I need the workflows to trigger or with a direct DB update if not.
Joe
TSolucio
Posts: 57
Threads: 14
Joined: Jun 2020
Reputation:
10
OK, clear,
I added check box custom field to product in order to to mark "used" ones.
Then added workflow to mark product "used" when Inventory details is creaded for that product.
So for all new (this year imported) products i will be able to know which of them where not used after one year, when new pricelists were available, so not used ones, coudl be deleted, because there is no need to keep them in the system.
So now i will build SQL querry with the relation existance at vtiger_inventoryrproductelate table checking and will mark the matching records as "used" once.
But it would be nice to have this type of filter, let it be a custom query type or something similar.