0

I am working on a Search Function using custom controller. I have 4 Filters (Account Name, Country, Account Type, Contact Name) in my Search Criteria Section.

I have a requirements that, it must have a facility where System Administrator can limit the number of filters displayed on the Search Criteria.

How will I do this?

I think there will be a scenario that the admin can choose either, which the four filter is to be displayed.

1 Answer 1

0

To achieve this

  • Have a custom setting to maintain which fields needs to be enabled as the filter criteria for your search.
  • In visual force page, display only those filters which are enabled in custom setting by system administrator.
  • In controller, write a dynamic SOQL to get the results based on the filter criteria.
2
  • I checked the custom setting and i have no idea on how to create a field or to enabled. Can you share me a link? So that i can refer on it. Commented Feb 11, 2019 at 13:17
  • Or Can you give me a sample? on how to create? Sorry i am just a newbie on this work. Commented Feb 11, 2019 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .