cancel
Showing results for 
Search instead for 
Did you mean: 

Backoffice: Sort by multiple criteria

0 Kudos

I want to sort by multiple criteria in the backoffice.

e.g: by Article Number and Catalog version. ->
(MasterCatalog > be-Catalog - staged > it-Catalog > staged > be-Catalog - online)
Is there a way I can do it? (Custom Handler, Backoffice config)

Accepted Solutions (1)

Accepted Solutions (1)

pavan_joshi1
Participant
0 Kudos

Hello,

Sort by multiple fields is not default behavior in most suites, unless really a requirement and customized.

As an answer, we can customize your simple and advanced search by extending below class and override methods.

You can set/ edit WHERE conditions, OrderBy statements.. so on.

I had worked on this part only for setting search field restriction for simple LIKE search.

DefaultPlatformFieldSearchFacadeStrategy
protected GenericSearchQuery buildQuery(SearchQueryData searchQueryData) {...}
..
protected GenericSearchOrderBy createSortCondition(GenericQuery query, String typeCode, SearchQueryData searchQueryData) 
{
    ...
    // searchQueryData.getSortData().getSortAttribute();
}
0 Kudos

@Pavankumar JoshiHow do you extend this class so that the subclass is called only for a certain column sort

Answers (0)