LeadChangesFields
Query fields of lead changes.
Select
Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.
SELECT * FROM LeadChangesFields WHERE ActivityDate = '2024-02-02 08:15:10.0'
SELECT * FROM LeadChangesFields WHERE ActivityDate > '2024-01-17T14:32:21'
SELECT * FROM LeadChangesFields WHERE ActivityDate >= '2024-01-17T14:32:21'
SELECT * FROM LeadChangesFields WHERE ActivityDate > '2024-01-17T14:32:21' AND ActivityDate < '2024-02-17T14:32:21'
SELECT * FROM LeadChangesFields WHERE LeadId IN (4, 14454)
SELECT * FROM LeadChangesFields WHERE ListId = 1014
SELECT * FROM LeadChangesFields WHERE ListId = 1014 AND ActivityDate > '2023-06-14T14:13:27Z'
SELECT * FROM LeadChangesFields WHERE LeadId = 9 AND ActivityDate > '2023-06-14T14:13:27Z'
Use LeadFields to specify the Lead columns from which you want to retrieve changes. Defaults to all columns. Retrieve column names from SYS_TABLECOLUMNS and provide them as comma-separated values.
SELECT * FROM LeadChangesFields WHERE LeadFields = 'mobilePhone'
SELECT * FROM LeadChangesFields WHERE LeadId = 4 AND LeadFields = 'mobilePhone'
Columns
Name | Type | Operators | Description |
ActivityId | String | Unique id of the activity. | |
ActivityDate | Datetime | >,>=,=,<,<= | Datetime of the activity. |
ActivityTypeId | Int | Id of the activity type. | |
LeadId | Int | =,IN | Id of the lead associated to the activity. |
LeadChangeFieldId | Int | Unique integer id of the change record. | |
LeadChangeFieldName | String | Name of the field which was changed. | |
LeadChangeFieldNewValue | String | New value after the change. | |
LeadChangeFieldOldValue | String | Old value before the change. | |
ListId | Int | = | Mirror column that can be used only as a filter. Will retrieve activities for all leads that are members of this static list. Not available when UseBulkAPI=true. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
LeadFields | String | Mirror column used to specify Lead columns for which you want to retrieve changes for. Defaults to all columns. Column names can be retrieved from SYS_TABLECOLUMNS. SELECT [ColumnName] FROM SYS_TABLECOLUMNS WHERE TableName='leads' and should be provided as comma separated values. |