Run batch Apex jobs from the Developer console to automate tasks such as setting
affiliation types, creating reciprocal affiliations, and establishing primary affiliations between
accounts and parent organizations. Track the status and health of your batch Apex jobs and
terminate them from Setup when necessary.
Required Editions
Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions with Life
Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the
Life Sciences Customer Engagement managed package.
User Permissions Needed
To create, edit, and delete Life Sciences Cloud data:
Life Sciences Commercial Admin permission set
Before you run the AffiliationDataLoadProcessorBatcha batch job, turn off the
HardAffiliationHandler and the AffiliationReciprocalHandler trigger handlers. Before you run the
AccountPrimaryAffiliationBatch batch job, turn off the HealthcareProviderAffiliationHandler
trigger handler.
Run the batch Apex job using this Apex code: Map<String, Object> paramMap = new
Map<String, Object>{ 'batchName' => '{your_batch_name}', 'batchSize' =>
'{your_batch_size}', 'isCreatedByCurrentUser' => '{your_is_created_by_current_user_boolean}',
'createdAfter' => '{your_datetime}', 'whereClause' => '{your_where_clause_string}' }; // Call
Boolean result =
(Boolean)(lsc4ce.LifeScienceApi.getInstance(lsc4ce.LifeScienceApi.Command.AffiliationBatchJob).execute(paramMap));
System.debug('Result: ' + result);
The batchSize, createdAfter, isCreatedByCurrentUser, and whereClause parameters are
optional. For instructions on how to run batch Apex jobs, see Executing Anonymous Apex Code.
This code runs the
AffiliationDataLoadProcessorBatch job, setting the batch size to 200. It processes only the
records that were created by the logged in user on the 1st of August 2025 at 0 hours.
It executes the records with the affiliation-strength type as high.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
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
Always Active
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
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
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.