Skip to content
Declarative Scheduler - use the reporting engine and subscribe feature to update records in report on a daily/weekly/monthly schedule
Branch: master
Clone or download
Latest commit ae532f0 Feb 21, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
retrieve_09S6F000002gUwnUAE Add files via upload Oct 13, 2017
README.md Update README.md Feb 21, 2018

README.md

Declarative Scheduler Tool

Declarative Scheduler Tool for Salesforce admins - use the reporting engine and subscribe feature to update records in report on a daily/weekly/monthly schedule

Instructions

View the blog post on the Salesforce tool at GravityLab which includes a managed package link

Overview

  • Create a report with the record id in column 1 and a datetime field in column 2
  • Add the filters you like
  • Click subcribe. Then select a custom action. Then Declarative Scheduler (make sure to turn off the salesforce1 notification
  • Set up when you would like these records to update and then schedule away
  • On the scheduled time the datetime field will be updated. So set up a process builder to fire when that field changes. And voilla you have a repeating schedule.

Sample user cases

  • A report of all leads over 4 days that have been stuck on a status for 4 days
  • Create a task to follow up on all opportunities that have a closed date in the past and no follow up tasks and haven't been modified in the last 7 days
  • Send an email on a contacts birthday
  • Process mass updates to all data (create a workflow to fire when the triggering field change and then to do the function you want)
  • Delay bulk workflow actions into a nightly job
  • Backdate workflow processing - when you created a workflow/process build you can trigger it to run on all of the existing records :)
  • Let me know yours...

Notes: - It works off super batch apex so you can change the batch size in custom settings. This stops any soql 101 or timeout process builder/flow errors - Has been tested to work on reports of up to 50,000 records. Don't go larger of Salesforce CPU times out - It's built to be generic so works across all obejects - but you should add in your own datetime field.
Todo: - Better test classes - Instructions - Testing - Guidelines and examples

Version 2.0

Major update based on https://github.com/DouglasCAyers/sfdc-add-campaign-members-by-report It can now add campaign members. Works of a "Scheduled Report" object rather than scheduled reports. Can have individual batch sizes, logs errors, has an easy tool to select the correct fields.

Version 0.2

10/8/17 - Added error capturing. Emails the person who last modified the report if it is causes an apex error.

Managed package link: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7F000001NDpv


# Version 0.1 Launch

Install the code

deploy

Publisher

Published by Dan Howell at GravityLab. A Salesforce Consulting Partner based in New Zealand




Credit:

Douglas for showing me the idea and for some of his code :) https://github.com/DouglasCAyers/sfdc-add-contacts-to-campaign-report-service

Andy For all of his work in the area. And for me to learn off soem of his code https://andyinthecloud.com/2016/02/28/dynamically-creating-flows-in-apex/

You can’t perform that action at this time.