Filters and Filter Logic Examples
Global sharing filter:
In this example, a global sharing filter will be created for records in an entity. Only employee users will see the record if the fields meets the filter criteria. The filter criteria is such that employee users will only see accounts if Partner Level above a threshold or has an annual revenue above a threshold, and is active within the past year.
- In the Setup Home page, click Create > Entities.
- Click Account.
- Click the Sharing Filters tab.
- Click New.
- In the Role field, select the Employee security role.
- In the Specify Optional Filters pane, enter specific filter rules:
Filter 1
- Click Add Filter.
- In the Field dropdown, select Partner Level.
- In the Operator dropdown, select greater or equal.
- In the Value textbox, enter "2".
- Filter 2
- Click Add Filter.
- In the Field dropdown, select Annual Revenue.
- In the Operator dropdown, select greater than.
- In the Value textbox, enter "50,000".
- Filter 3
- Click Add Filter.
- In the Field dropdown, select Last Active.
- In the Operator dropdown, select less than.
- In the Value textbox, select Last Year.
- In the Advanced Filter Logic pane, in the Filter field, enter "(1 OR 2) AND 3".
- Click Save.

Lookup filter:
In this example, a lookup filter is used to ensure only customer account records are shown in opportunity entities.
- In the Setup Home page, click Create > Entities.
- Click the Opportunities entity, then click the Fields tab, then click the dropdown arrow beside Account, and then click Edit.
- In the Filter Conditions pane, check the Use Filters checkbox.
- In the Field dropdown, select Account Roles.
- In the Operator dropdown, select equals.
- In the Type dropdown, select Value.
- In the Value field, enter "Customer".
- In the Error Message field, enter a custom error message.
- Click Save.

<< Filters and Filter Logic