Newer Version Available

This content describes an older version of this product. View Latest

WITH DivisionFilter

The optional WITH clause allows you to filter all search results based on division. Although you can also filter on an object's Division field within a WHERE clause, using WITH is preferable because:
  • It pre-filters all records based on division before applying other filters
  • You can specify the division's name in the filter, rather than its ID (as is required if you filter on division in the WHERE clause)

For example:

1FIND {test} RETURNING Account (id where name like '%test%'),
2                      Contact (id where name like '%test%')
3            WITH DIVISION = 'Global'
  • Users can perform searches based on division regardless of whether they have the “Affected by Divisions” permission enabled.
  • All searches within a specific division also include the global division. For example, if you search within a division called Western Division, your results will include records found in both the Western Division and the global division.

Note