HomeGuidesRelease Notes
Get supportBook a chat
Guides
These docs are for v2.51. Click to read the latest docs for v2.208.

Automating Status Changes

How to update Course Status based on end date and start date

Here we will explain how to configure Courses so that their Status is automatically changed based on completion criteria. Let's clarify that for you:

The system searches for Courses whose Status is Scheduled but whose Start date is today. For Courses that match these conditions, the system will change the Status from Scheduled to Active.

The system also searches for Courses whose Status is Active but whose End date is yesterday. For Courses that match these conditions, if the Status is Active, it will be changed to Completed.

To configure this, follow these steps:

Automatic Status Update

Go to Setup.

1896

Setup

Then search for Jobs in the Quick find search bar, and click on Scheduled Jobs.

1312

Scheduled Jobs

If no Scheduled job is set to CourseStatuschanging, it must be created as follows:

In the Quick find search bar, type in Custom Code, and click on Apex Classes. Then click on Schedule Apex.

1544

Schedule Apex

  1. Give the job a name, e.g., Course Status Update.
  2. Select the Apex Class CourseStatusBatchSchedule.
1152

Course Status Batch Upload

  1. Set the frequency to Weekly and mark all days of the week.
  2. Define a Start date and an End date as well as the Preferred Start Time.
  3. Click Save.
1218

Schedule Apex filled

This configuration means that a Batch Process will run every day at the defined Preferred Start Time, from the defined Start date up to the defined End date.


Did this page help you?