UriEvent
Detects when a user creates, accesses, updates, or deletes a record
in Salesforce Classic only. Doesn't detect record operations done through a Visualforce
page or Visualforce page views. UriEvent and is a big object that stores the event
data of UriEventStream. This object is available in API version 46.0 and later.
Supported Calls
describeSObjects(), query()
Special Access Rules
Accessing this object requires either the Salesforce Shield or Salesforce Event Monitoring add-on subscription and the View Real-Time Event Monitoring Data user permission.
Fields
Standard SOQL Usage
UriEvent allows filtering over two fields: EventDate and EventIdentifier. The
only supported SOQL functions on the UriEvent object are WHERE, ORDER BY, and LIMIT. In the WHERE
clause, you can only use comparison operators (<, >, <=, and >=). The != operator
isn’t supported. In the ORDER BY clause, you can only
use EventDate DESC. Ascending order isn’t supported
with EventDate, and EventIdentifier sorting isn’t supported.
The following list provides some examples of valid queries:
-
Unfiltered
-
Valid—Contains no WHERE
clause, so no special rules
apply.
SELECT EntityType, UserName, UserType FROM UriEvent
-
Valid—Contains no WHERE
clause, so no special rules
apply.
-
Filtered on EventDate—you can filter solely on
EventDate, but single filters on other fields fail. You
can also use a comparison operator in this query type.
-
Valid—you can filter solely on
EventDate, but single filters on other fields fail. You
can also use a comparison operator in this query
type.
SELECT EntityType, UserName, UserType FROM UriEvent WHERE EventDate>=2014-11-27T14:54:16.000Z
-
Valid—you can filter solely on
EventDate, but single filters on other fields fail. You
can also use a comparison operator in this query
type.
Async SOQL Usage
With Async SOQL, you can filter on any field in UriEvent and use any comparison operator in your query.
Find who is accessing Opportunities and related Contacts
SELECT EventDate, EventIdentifier, UserName, UserType, Name, EntityType, Operation, LoginKey, SessionKey FROM UriEvent WHERE RecordId='001B000000AkcHxIAJ'