Question

Fixed filter on lookup page

Hello Community,

 

I'm looking possibility to add fixed filter on lookup page.

 

I know that in the view model schema in lookup config i can change lookup page for custom one.

    var config =  { lookupPageName :"UsrLookupModule",...}

On my own Lookup page i can use custom module LookupPageViewGenerator and new control in function getFilteringControlsConfig. But next i don't know how to extend onSearchButtonClick to apply additional filter.

 

Regards,

Marcin

Like 0

Like

2 comments
Best reply

Hello Marcin,

 

onSearchButtonClick method is a part of LookupPageViewModelGenerator that is a module in the system so you need to override this module as described in this community post https://community.creatio.com/questions/replacing-client-module.

 

The filter itself is stored in the "searchFilter" key of the "LookupInfo" object that is formed from the lookupInfo.filters key values in, for example, loadData method of the same LookupPageViewModelGenerator:

and

This could help in creating a default filter when opening the modal window of the lookup. Also loadData method is called in the onSearchButtonClick method (that is called when clicking the "Search" button) so I guess you also need to take a look at the loadData method as well.

 

Best regards,

Oscar

Hello Marcin,

 

onSearchButtonClick method is a part of LookupPageViewModelGenerator that is a module in the system so you need to override this module as described in this community post https://community.creatio.com/questions/replacing-client-module.

 

The filter itself is stored in the "searchFilter" key of the "LookupInfo" object that is formed from the lookupInfo.filters key values in, for example, loadData method of the same LookupPageViewModelGenerator:

and

This could help in creating a default filter when opening the modal window of the lookup. Also loadData method is called in the onSearchButtonClick method (that is called when clicking the "Search" button) so I guess you also need to take a look at the loadData method as well.

 

Best regards,

Oscar

Oscar Dylan,

 

This is exactly what i'm looking for. Thank you for the full explanation.

 

Regards,

Marcin

 

 

Show all comments