Question

Filter Contact lookup on DB Level

Hi Community,

 

In the Opportunities object I have a new lookup to the Contact that is called BUManager.

 

I have filtered the possible values displayed for this field in the Opportunities page  based on a boolean in the Contact: BUManager = true

 

I would like to filter the values from this field so that when I'm using the standard filters in the Opportunities section page, I get only the "BUManager = true" Contacts and not all of the Contacts.

I couldn't find how to achieve this. Is it possible?

 

Thanks,

Luis

 

Like 1

Like

1 comments

Hi Luis,

 

What has to be done is overriding the logic of the getLookupValueColumnList method from the CustomFilterViewModelV2 since this method is responsible for returning the set of data in the selection list from the filter. The main difficuty here is to properly override the logic of this method (using the approach described here) since there is a need not to override the CustomFilterViewModelV2 only, but also the getDefaultModuleConfig method from the QuickFilterModule (this method returns module config for quick, custom, tag and folder filters). There are no examples of this implementation so it should be tested.

Show all comments