Skip to Content
0
Jul 06, 2020 at 09:39 AM

Restricting the results in Listview

57 Views

Hi,

I am trying to display a list of order entries associated with a product. It is done with the help of advanced search and it is working fine. However I need to further filter out the order entries based on the version id of order. Is it possible?

final AdvancedSearchData searchData = new AdvancedSearchData();

searchData.setTypeCode("OrderEntry");

final WidgetInstanceManager wim = (WidgetInstanceManager) this.editorContext.getParameter("wim"); searchData.setGlobalOperator(ValueComparisonOperator.AND);

final AdvancedSearchInitContext initContext = this.orderEntriesFinderEditor.createSearchContext(searchData, wim, this.editorContext);

I know I can add condition like this to filter based on a direct attribute in OrderEntry. My doubt is how do I reference order.versionID from here.

searchData.addCondition(entryStatus, ValueComparisonOperator.UNEQUAL, OrderEntryStatus.CANCELLED);