Useful Examples

17min

Search by e-mail address

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

Document image

Document image



Searching e-mails by e-mail addresses

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

Document image


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

Document image



Searching by tags

Search by the name field on the Tags link:

Document image



Searching for favorites

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

Document image



Searching for records that you follow

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

Document image



Searching multi-select fields

Use the contains operator:

Document image



Searching for records related to a particular record

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:

Document image



Searching for my records

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:

Document image

Document image




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.

Document image

Document image


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

Document image



Searching for other users' records

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:

Document image


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:

Document image

Document image

Document image


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

Document image



Searching for minimal and maximal 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:

Document image


To find the least valuable Opportunity, the query is analogous, except with <=.



Searching for single records

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:

Document image


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

Updated 25 Mar 2024
Doc contributor
Did this page help you?