The Project Pulse framework allows for complex customizations. In this post we will cover the topic of customizing a lookup by adding some default filters in order to exclude non-interesting records.
We will use the Staff lookup as an example. Typically, when adding resources to a project, you don’t want to see inactive or users no longer available to assign. This is how you can exclude these staff records from lookups, but still have the option to see them if needed.
Step 1 – Create a Default Query Panel for the Staff Lookups
- Go to the Query Panels tab (part of the Data Loader app)
- Load a List View by clicking on the Go button
- Now you should see a new button labeled “Query Panel Wizard”, click on the button
- Once the wizard loads, select the Staff as Primary Object
- Select the following fields in the “Select Fields” section and click on Add Selected
- Now in the Drill Up dropdown, select the User object. Then select the Active field and add it
- Check the Is Lookup Query Panel box
- Change the Fields per Row field to 3
- Save the Query Panel
This action will create a new Query Panel for lookups to the Staff record. As it is, you would still need to select values for the Active filters in order to filter out inactive users. But we can customize the Query Panel filters with some defaults for a better user experience.
Step 2 – Edit the Query Panel with Custom Defaults
After saving the Query Panel, you should see the Salesforce record Page Layout for what you just created. You should also see a Query Parameters related list, if you don’t see it, edit the page layout and add it.
- In the Query Parameters related list, edit the “Is Active” parameter (you may have to edit the related list layout to show the Label field) and follow the following steps:
- Go back to the Query Panel record and now edit the “Active” Query Parameter and follow the following steps:
Now go try it out by adding a resource to a project, you should see a new Query Panel pre=populated with the default values we set.