Power Tools Script Library

The Power Tools Script Library allows you to store apex scripts as salesforce records and run them at your convenience with a push of a button or schedule them to run at a timing of your choice. The results of your apex scripts are returned and you can optionally store these results (debug log results and user debug lines) as a related record.

About Script Libary

The Script Library uses an anonymous block - executeAnonymous(), for running Apex Scripts within Salesforce. Please note the following about running Scripts:

Create a Script

New Script

  1. From the Scripts Tab, click on New.
    Lightside Scripts Tab

Script without a Schedule

  1. Enter the Script Name, Description and Apex Code and select the API Version that the Apex should run with.
  2. Optionally select to Save Debug Logs. This is especially useful to view the results of scheduled scripts.
  3. Click Quick Save or Save and Return
    Lightside Script without Schedule

Run Scripts

Scheduled Scripts

Scheduled Scripts will run at their designated scheduled time as long as the Schedule Credentials have been entered and are valid.


Run a script manually from either:

Script Results

Displayed Script Results

After running a script the Script Results will be displayed, including the Script Results, User Debug and Debug Log.

Saved Script Results

If Save Debug Logs was selected on the Script record. A related Script Result record will have been saved. Click through to the record by clicking on the Script Result Number. The Script Results will then be displayed.