Loading

Financial Services Cloud: FinServ managed package triggers exceed governor limits (Too many query rows: 50001, UNABLE_TO_LOCK_ROW, CPU time limit exceeded)

Publish Date: May 28, 2026
Description

This article explains why FinServ managed-package triggers (FinServ.LeadTrigger, FinServ.AccountTrigger, FinServ.FinancialAccountTrigger) and the FinServ.RollupByLookupHandler queueable job throw governor limit exceptions during record updates, mass transfers, and bulk data loads in Salesforce Financial Services Cloud, and how to resolve it without modifying managed code. Customers describe this as: "FinServ.LeadTrigger: too many query rows: 50001 — the trigger is firing multiple times and querying all leads the user has ever created", "FinServ.RollupByLookupHandler ... UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 5 records", and "finserv.account trigger CPU limit exceeded ... we do not have any control over this trigger as it is part of managed code". Trigger conditions: (1) Too many query rows: 50001 occurs when the trigger context owner or Primary Owner is associated with more records than the 50,000 SOQL row limit can aggregate (typically a user with more than ~1,000 Leads or a Primary Owner with more than 1,000 Financial Accounts); (2) UNABLE_TO_LOCK_ROW occurs when parallel Bulk API batches or queueable RBL jobs attempt to update the same parent Account/Household concurrently; (3) Apex CPU time limit exceeded occurs during Mass Transfer of Accounts when FinServ.AccountTrigger and chained RBL recalculations run synchronously over a large set. Tracked as Known Issue KI-67961 (Mass Transfer Accounts CPU limit) and KI-02984 (RBL queueable limit on FinancialAccount ownership change). Affected: Financial Services Cloud managed package, Professional/Enterprise/Unlimited Editions, Lightning Experience.

Resolution

Apply the cause-specific steps below. The FinServ triggers are part of the managed package and cannot be modified directly; the resolution is to control the data volume per transaction and to manage when rollups run.

Cause 1: "Too many query rows: 50001" from FinServ.LeadTrigger, FinServ.AccountTrigger, or FinServ.FinancialAccountTrigger
1. Identify the owner or Primary Owner involved. Run a SOQL query in Developer Console such as: SELECT COUNT() FROM FinServ__FinancialAccount__c WHERE FinServ__PrimaryOwner__c = '[OwnerId]' (or COUNT() FROM Lead WHERE OwnerId = '[UserId]'). If the count is greater than 1,000, this is the trigger.
2. Reduce the related-record count below 1,000 per Primary Owner / per Lead owner by reassigning records. For Financial Accounts, the documented FSC limit is 1,000 Financial Accounts per Individual Account.
3. For bulk loads, navigate to Setup > Custom Settings > Wealth Application Config [FinServ__WealthApplicationConfig__c] > Manage, click Edit on the Default Organization Level Value, and clear the Enable Rollup Summary [FinServ__EnableRollupSummary__c] and Enable Group Record Rollup [FinServ__EnableGroupRecordRollup__c] checkboxes. For an integration user, create a user-level setting in the Setup Owner related list and clear the same two checkboxes there permanently.
4. Run the bulk insert/update with Data Loader or Bulk API.
5. Re-enable Enable Rollup Summary and Enable Group Record Rollup at the org level after the load.
6. Recalculate rollups by executing in Developer Console > Open Execute Anonymous Window: Database.executeBatch(new FinServ.GroupAssignmentBatchable()); If Record Rollup Optimization is enabled, run Database.executeBatch(new FinServ.HouseholdAssignmentBatchable()); instead.
7. Recalculate Rollup By Lookup by navigating to App Launcher > Rollup By Lookup Configurations, selecting the active rules, and clicking Run Rules.

Cause 2: "UNABLE_TO_LOCK_ROW" from FinServ.RollupByLookupHandler queueable jobs or during Bulk API loads
1. In your Bulk API client (MuleSoft, Data Loader, Azure Function, etc.) set the processing mode to Serial instead of Parallel. In Data Loader: Settings > Settings, select the Use Bulk API checkbox, then select Enable serial mode for Bulk API.
2. Reduce the Bulk API batch size to 200 or lower.
3. Sort the input file by the parent reference (for Financial Account Roles, sort by FinServ__RelatedAccount__c [FinServ__RelatedAccount__c]; for Financial Accounts, sort by FinServ__PrimaryOwner__c [FinServ__PrimaryOwner__c]) so that all child records sharing a parent are grouped into the same batch.
4. For ownership changes on FinServ__FinancialAccount__c records, do not update FinServ__PrimaryOwner__c or FinServ__JointOwner__c from a batch Apex context — this is documented in KI-02984. Update ownership through Data Loader in serial mode instead.
5. Before large loads, disable rollups using the Wealth Application Config steps in Cause 1, step 3. Re-enable and run FinServ.GroupAssignmentBatchable (or FinServ.HouseholdAssignmentBatchable) and the RBL recalculation afterwards.

Cause 3: "FinServ.AccountTrigger: System.LimitException: Apex CPU time limit exceeded" during Mass Transfer of Accounts
1. Stop using Setup > Mass Transfer Records > Transfer Accounts for large transfers. This path is tracked as Known Issue KI-67961.
2. Split the transfer into smaller batches of fewer than 200 Accounts per Mass Transfer operation.
3. For larger volumes, use Data Loader to update the OwnerId [OwnerId] field on Account records directly. In Data Loader, select Update, set Use Bulk API with serial mode, and use a batch size of 200.
4. Before the load, disable rollups via Custom Settings > Wealth Application Config > Manage > Default Organization Level Value, clearing Enable Rollup Summary and Enable Group Record Rollup as in Cause 1, step 3.
5. After the OwnerId update completes, re-enable both rollup checkboxes and run Database.executeBatch(new FinServ.GroupAssignmentBatchable()); from Developer Console.
6. Recalculate active RBL rules from App Launcher > Rollup By Lookup Configurations > Run Rules.

Optimize ongoing rollup performance (all causes)
1. Navigate to Setup > Custom Settings > Record Rollup Configuration [FinServ__RecordRollupConfiguration__c] > Manage and click New for each object (for example FinancialAccount__c, Case). Set a batch size such as 500 to limit per-batch volume.
2. Navigate to Setup > General Settings (under Financial Services) and enable Record Rollup Optimization. After enabling this, use FinServ.HouseholdAssignmentBatchable in place of FinServ.GroupAssignmentBatchable.
3. Navigate to Setup > Custom Metadata Types > Use Standard Trigger > Manage Records, open each FSC standard trigger, click Edit, and select Active to enable optimized Before Insert and Before Update rollup trigger code.

Confirm the issue is resolved by re-running the original failing operation (the Lead-creating flow, the Bulk API upsert into Financial Account or Lead, or the Account ownership transfer) and verifying that the FinServ.LeadTrigger / FinServ.AccountTrigger / FinServ.FinancialAccountTrigger / FinServ.RollupByLookupHandler errors no longer appear in the debug log or in the Apex Jobs page at Setup > Apex Jobs.

Knowledge Article Number

005385063

 
Loading
Salesforce Help | Article