If you're new to Salesforce and want to ensure your data stays accurate and relevant, lookup filters are a powerful tool you need to master. This beginner tutorial walks you through the process step by step.
Lookup filters restrict the records that users can select when filling in a lookup field. For example, you can limit an Account lookup on a Contact record to show only active accounts, preventing users from accidentally selecting inactive ones.
Step-by-Step Guide
- Navigate to Object Manager
- From the Setup menu, go to Object Manager and choose the object containing the lookup field you want to filter (e.g., Contact).
- Edit the Lookup Field
- Find the Account lookup field (or your desired field) and click Edit.
- Set Up the Filter
- In the field details, scroll to the 'Lookup Filter' section.
- Activate the filter and define your criteria using standard Salesforce operators (e.g., Account: Active equals True).
- You can also add multiple conditions using AND/OR logic.
- Configure Error Handling
- Decide what happens if a user's existing data violates the filter: show an error message or allow it with a warning.
- Save and Test
- Save the field and create a new record to verify the filter works as expected.
Tips for Success
- Use clear filter names and descriptions so other admins understand your logic.
- Test filters thoroughly in a sandbox before deploying to production.
- Remember that filters only apply to new selections; existing values are grandfathered unless you enable strict enforcement.
With lookup filters, you can dramatically reduce data entry errors and maintain a cleaner Salesforce org. Start implementing them today!