Useful Examples
Use the Email Addresses link to search all e-mail addresses, not only the primary ones.


It is necessary to explicitly search the e-mail address on the From, To, Cc or Bcc links.

Here is an example of searching for E-mails having "sarah" in either the From or To fields:

Search by the name field on the Tags link:

Search for records that have a non-empty favorite link:

Search for records that have a non-empty following link:

Use the contains operator:

To search for records related to a particular record, it is first necessary to determine the ID of this particular record. For instance, if you wanted to search for Calls related to Account Abc inc, you would first need to find the ID of Abc inc. You can learn how to do this in this FAQ.
Once you've got the ID, it's simply a matter of querying the ID field on the appropriate relationship. Assuming the ID of Abc inc was b582e48a-b5ea-11ed-9a54-0242ac1b0002, this is how we would search for Calls that are related to this Account:

There are two ways you can include a "my records" condition to your query, depending on what you need to achieve.
If you simply need to apply a query and also filter the resulting records to only contain those assigned to you, you can simply use the existing My records filter, which will automatically be combined with your query using and:


If you need to build more complicated queries, such as involving or, you will first need to find out the ID of your user. To do that, navigate to your Profile, and copy it out of the address bar. It will be located right after records=, as seen in the picture below.


Once you have that, you can search by the Assigned User Name link, and combine it with whatever you need:

In this case, the process is very similar to searching for your own records. You again have the option of combining your query with built-in filters using and:

Alternatively, you can determine the IDs of the users you need to search by. As with your own ID, this can be copied from the address bar in the Employees module, after selecting the user you're interested in:



This can then be used analogously to searching for your own records.

Using a trick, it is possible to retrieve records that are the "largest" or "smallest" by some numerical field. For instance, you can use this to search for the most valuable Opportunities of each Account.
The trick relies on the fact that the largest/smallest record is always larger-/smaller-than-or-equal-to all other records.
Here's how you would list the most valuable Opportunities of each Account:

To find the least valuable Opportunity, the query is analogous, except with <=.
A similar trick to the one above can be used to find records where only a single related record exists.
This trick relies on the fact that if there is only a single record, <all!> record IDs are equal to each other.
Here are all Accounts which only have a single Opportunity:

Careful, the <all!> must be on the right-hand side!