Setting or Resetting the Case Flags batch jobsYou are using Case Flags and need to reset / change the running use for the packaged Business Hours batch job.Oct 30, 2025Knowledge
InformationPermalinkHelp Permalinkhttps://kb.vicasso.com/?kb=000004726DetailsHelp DetailsCase Flags comes packaged with 3 batch jobs: Case Flags Job (Business Hours): used to set the FLAGS__PreviousBusinessHours__c field (and FLAGS_METRICS__Business_Hours_Elapsed_Previous__c if using the Metrics Extension) with the amount of business hours that have lapsed prior to the current day.Clear Flag Job: used to automatically clear the flags based on values defined in the 'Automatically Clear Flags on Closed Cases' setting in the Setup Wizard.Flag History Cleanup Job: used to automatically delete historic Case Flags History Tracking Records based on values defined in the 'Automatically Delete Historic Case Flags History Tracking Records' setting in the Setup Wizard If you need to reset or change the running user for the packaged Case Flags batch jobs, follow the instructions below. Note: As of version 6.55 of Case Flags, the Business Hours batch job running user is displayed in the setup wizard. Business Hours batch job: Log in to Salesforce as the user you'd like to run the batch job as.Navigate to Setup > Installed Packages > Configure next to Case Flags.Once in the Setup Wizard, check to see which Hours are currently selected. If Standard Hours are selected, simply select the Business Hours option to create the batch job. If Business Hours are selected, select Standard Hours, wait 5 seconds, and then reselect Business Hours to reset the batch job.Click the bubble next to Standard Hours, hit Save at the top of the page, and wait 5 seconds.Re-select Business Hours and click Save again.Navigate to Setup > Jobs > Scheduled Jobs and ensure the job titled "Case Flags Job" is showing submitted by the new user you are logged in as. Flag Cleanup batch job: Log in to Salesforce as the user you'd like to run the batch job as.Navigate to Setup > Installed Packages > Configure next to Case Flags.Once in the Setup Wizard, navigate to the Flag Event Rules tab.For the setting 'Automatically Clear Flags on Closed Cases', select 'Disabled', Save and wait 5 seconds.Re-select the value you want the setting to use and click Save at the top of the page.Make sure no error messages show up.Navigate to Setup > Jobs > Scheduled Jobs and ensure the job titled "Clear Flag Job" is showing submitted by the new user you are logged in as. History Cleanup batch job: Log in to Salesforce as the user you'd like to run the batch job as.Navigate to Setup > Installed Packages > Configure next to Case Flags.Once in the Setup Wizard, navigate to the Case Flags History Tracking tab.Under the 'Automatically Delete Historic Case Flags History Tracking Records' section, for the 'How long to save tracking history' setting select 'Always Save' from the dropdown menu, hit Save, and wait 5 seconds.Re-select the value you want the setting to use and click Save at the top of the page.Make sure no error messages show up.Navigate to Setup > Jobs > Scheduled Jobs and ensure the job titled "Flag History Cleanup Job" is showing submitted by the new user you are logged in as. Note: In order to set or reset the batch jobs, the user needs to be a System Administrator or have similar permissions, along with the Case Flags Admin Permission Set. If the user can get to the Case Flags Setup Wizard and make changes, they're eligible on being the running user for the batch jobs.TitleSetting or Resetting the Case Flags batch jobsURL NameHelp URL NameSetting-or-Resetting-the-Case-Flags-batch-jobs