Skip to main content

Return to TX Community

Liaison

Removing 'Expression' records

CAUTION: This process deletes records. TargetX recommends that you Backup your Expression data before enabling this job (Navigate to Setup and search for Data Export).


A Scheduled Job, Nightly Expression Cleaner, available in Base Custom Settings, is used to clean up Expression records. Expression records are created whenever a Section is added to a Portal, as well as when a Condition Set is added to a Section. When a Portal, Assignment Group, or any entity utilizing expression records, is deleted, the associated expression records remain intact. This trigger is designed to remove these orphaned records, which persist after deleting the configuration they were originally linked to.

The Start Expression Cleaner button will schedule a batch job at 1:00 AM daily. If you prefer a different time, do NOT Start the  Expression Cleaner button, and instead follow the instructions below to schedule it at a different time (see: Schedule Nightly Expression Cleaner Job).

You can view the Status of the job using the following steps:

  1. Navigate to Setup and search for Apex Jobs.
  2. Locate the job StartCleanExpression Apex Class.

Scheduling the Nightly Expression Cleaner Job

If you prefer to schedule the Nightly Expression Cleaner job to run at a different time:

  1. Navigate to Setup and search for Apex Classes.
  2. Click Schedule Apex.
  3. Enter the following:
    1. Job Name = <User Defined>, such as ‘Portal Expression cleaner’
    2. Apex Class = StartCleanExpression
    3. Schedule Apex Execution:
      1. Set the Frequency, Start Date, End Date, and Preferred Start Time.
  4. Save your changes.

  • Was this article helpful?