Salesforce - Scheduled records search using SOQL query trigger (batch)

This trigger searches Salesforce using a SOQL query on a schedule you specify.

SELECT CLAUSE IN SOQL

SOQL queries don't support the SELECT * operation often used in SQL queries. You must specify specific fields to retrieve in the SELECT clause.

Input

Input fieldsDescription
SOQL queryEnter a SOQL query to filter records by. You must select ID using the SELECT statement for this trigger to work.
ScheduleSelect how often to search Salesforce.
Time zoneSelect a time zone for the schedule.
HourEnter the hour to search Salesforce. This field uses 24-hour format, for example: 11 for 11am or 23 for 11pm. Defaults to 00 (12am).
MinuteEnter how many minutes past the hour to search Salesforce in double digit format. For example: 01 for 1 minute past the hour.
Day of monthEnter a number between 1 and 31 to specify the day of the month to search Salesforce. Shorter months round this value down to the last day of the month. Defaults to 1.
SundaySelect whether to allow searches on Sundays.
MondaySelect whether to allow searches on Mondays.
TuesdaySelect whether to allow searches on Tuesdays.
WednesdaySelect whether to allow searches on Wednesdays.
ThursdaySelect whether to allow searches on Thursdays.
FridaySelect whether to allow searches on Fridays.
SaturdaySelect whether to allow searches on Saturdays.
Batch sizeEnter the maximum number of records to contain in each batch. The default value for this field is 100 and the maximum is 2000. Salesforce records with many custom fields require smaller batch sizes.

Salesforce Scheduled records search example Example of valid query in scheduled records search

Output

Output fieldsDescription
RangeThe range of records retrieved in the current batch.
Scheduled timeThe date and time scheduled for the search.
Total number of objectsThe total number of matching objects retrieved from Salesforce.
First batchA boolean indicating whether the current batch contains the beginning of the results list.
Last batchA boolean indicating whether the current batch contains the end of the results list.
Starting offsetThe offset number for the first record of this batch.
Ending offsetThe offset number for the last record of this batch.
First record nameThe name of the first record.
Last record nameThe name of the last record.
RecordsAn object containing information about the current record.

Last updated: