Skip to content

Release Notes v2.2

Doug Ayers edited this page Jul 21, 2019 · 19 revisions
Clone this wiki locally

Home > Release Notes > Upgrading to Release 2.2

鈿狅笍 When upgrading, please review all release notes between the version you're upgrading from through to the version you're upgrading. First, to be familiar with the changes, and second, because occasionally there are manual steps required to use the new features.


Check Deployment Settings Before Upgrading

Before upgrading, if you have actively scheduled configurations then you may need to enable the Deployment Setting to allow deployments of components when corresponding Apex jobs are pending or in progress. It's also recommended to upgrade during a time when no configurations are running to reduce risk of job failures during the upgrade.


New Apex Action: Anonymous Block

Closes #76

In prior releases, your target actions had to be something that you had already created in your org. Such as a process, a flow, a workflow rule, a quick action, an email alert, or an invocable apex class. In Release 2.2, you can now execute anonymous apex -- run your own logic without having to pre-create the action to execute in your org.

screen shot

Mass Action Scheduler supports two kinds of Apex actions:

  1. Classes annotated with @InvocableMethod
  2. Anonymous Blocks

For anonymous blocks, your script must include the following method definition, which will be passed the current batch of source records. Each execution of your script occurs in its own transaction.

void execute( List<Map<String, Object>> sourceRecordsBatch ) {
    // your logic here

Apex classes and anonymous blocks are invoked once per batch of source records, just like the execute method of a Batchable Class or a Bulk Trigger. However, unlike batchable or trigger code, no state is preserved within the script between executions. Though you may choose to manage and preserve state yourself between executions via DML to records or custom settings.

To use Apex actions, ensure the "Target Type" picklist of the "Mass Action Configuration" object has a picklist option with label and value of "Apex".

  1. From Setup, click Object Manager then click Mass Action Configuration.
  2. Click Fields & Relationships then click Target Type.
  3. In the Values section, if Apex is not an option then click New, type Apex, then click Save.

Get Notified When New Releases Are Available

Closes #33

The Mass Action Configuration page now checks to see if there is a newer version of the app available. If yes, then you see a message that says, "A new version is available. You're on version X. Upgrade to version Y."

screen shot

To be immediately notified of new releases by email, set your GitHub "Watching" preference for this repository to either Releases Only or Watching. The Release Only option will send you an email when I publish a new release on GitHub. The Watching option notifies you of activity on issues, such as bug reports and enhancement requests, too.

screen shot