This article explains how to resolve the "An instance of Activity Plan Calculation Batch is already in progress" error that occurs while executing the Calculate Provider Activity Goal Measures job.
In some cases, the batch job becomes stuck in an In Progress state even after the batch execution has finished. As a result, every subsequent attempt to run the job returns the same error because Salesforce detects an existing active batch instance.
This behavior is commonly caused by an incorrect configuration of the Provider Activity Measure Type record for Product activities. If the required parent object information is missing or incorrectly configured, the batch job cannot complete successfully, leaving the job status as In Progress.
Run the following SOQL query to locate the org-level Activity Plan job metadata:
SELECT Id, Name, RecordApiName, LifeScienceMetadataCategory.Name
FROM LifeSciMetadataRecord
Open the ActivityPlanJob_OrgLevel record and navigate to the Related tab.
Open the Life Science Metadata Field Values related list and locate the JobStatus record.
If the Text Value is In Progress, update it to Completed and save the record.
Note:
If the JobStatus is updated to Completed, the Calculate Provider Activity Goal Measures job may execute successfully; however, it can become stuck in an In Progress state again. When this occurs, subsequent attempts to run the job continue to fail with the "An instance of Activity Plan Calculation Batch is already in progress" error. This behavior typically indicates an underlying configuration issue with the Provider Activity Measure Type and requires the configuration to be reviewed as described in the next step.
Review the Provider Activity Measure Type record associated with the affected activity type.
Ensure that the following fields are configured correctly based on your organization's data model and business requirements:
Example: For a Product-based Provider Visit Product DetailingType, these fields may be configured as:
- Activity Parent Object:
Provider Visit- Activity Parent Object Relationship Field:
ProviderVisitId
If these fields are missing or incorrectly configure
Before rerunning the Calculate Provider Activity Goal Measures job, verify that all Activity Plan-related batch jobs have completed successfully and that none remain in an In Progress state.
Once the Provider Activity Measure Type configuration is corrected and all previous jobs have completed, rerun the Calculate Provider Activity Goal Measures job. The batch should execute successfully without returning the "An instance of Activity Plan Calculation Batch is already in progress" error.
005388480

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.