When you create a new Batch Info record. The tab “Batch Info” is not added to any App in Salesforce. So you can add it to the PDF Butler App if required.
Document with more information: BULK Butler – Initial Setup
You can set the following config:
- Name: Name of the Batch Info record
- Cron: Defines when the batch job must run. Make sure to use Cron expressions supported by Salesforce. More information can be found on this page: Salesforce Cron Expression
If you are not going to schedule the Batch Info but run it manually, just put “NA” as value of this field. - SOQL: This is the query that will return all records for with the batch must run. You can use the full Salesforce SOQL capabilities to filter or sort.
Common is that a WHERE clause is added to filter out only the records that need to be processed. - Emails: Comma seperated list of email recipients for the status of the job when it ends
- Doc Config: Lookup to the Doc Config that needs to run for each record returned by the SOQL. If left empty, a Pack is required.
- Pack: Lookup to the Pack that needs to run for each record returned by the SOQL. If left empty, a DocConfig is required.
A Pack can have an Actionable or other features supported in a Pack. - Batch Size: The amount of records processed in 1 chunk (a chunk is a subset of all the records but these get chunked to stay within SFDC governor limits). A good size is 5 but if you use a DocConfig or a Pack with an Actionable. It must be set to 1 to stay within SFDC governor limits
- Batch Apex Class: An APEX class that implements “cadmus_batch.Batch_ICadmusBatch”. See attached PDF for more information
- Count SOQL: this is normally the same query as in the SOQL field but not selecting and fields but counting the number of records eg: “SELECT Count() FROM Account”
- Make sure that this is a count-query. The Count() function cannot have any parameters.With bigger batch jobs, you can follow up on the status and see how many records to process and how many are already done.
- Delivery Option: The Delivery Option from the DocConfig will not be used. Indicate how the generated documents are saved related to the record.
- ATTACHMENTS
- ATTACHMENTS_OVERWRITE
- FILES
- FILES_OVERWRITE
- FILES_ADD_VERSION
- BASE64
- Use DocConfig Setting: Will look at the DocConfig but this can only be used when the Batch Size is set to 1 to stay within SFDC governor limits
- Alternative API Field: API name of the field that is part of the SOQL to select the records for batch processing. The field cannot be referenced via a lookup, must be directly on the SObject the SOQL is selecting from.
- Locale API Field: API name of the field that is part of the SOQL to select the records for batch processing. The field cannot be referenced via a lookup, must be directly on the SObject the SOQL is selecting from.
- Currency Locale API Field: API name of the field that is part of the SOQL to select the records for batch processing. The field cannot be referenced via a lookup, must be directly on the SObject the SOQL is selecting from.
- Target Type: PDF (default) or DOCX