This article explains why the FSC managed package trigger fails with an "unexpected token: 'SUM()'" or "unexpected token: 'MAX()'" error and how to resolve it. Customers describe this as: "When user tries to change the Financial Account status to Closed, she is getting error message — FinServ.FinancialAccountTrigger unexpected token 'SUM()'" and "We're encountering an issue in our FSC org when creating a Financial Account record — FinServ.FinancialAccountRoleTrigger unexpected token 'MAX()'". The full error text is: "FinServ.FinancialAccountTrigger: execution of AfterUpdate caused by: FinServ.MoiExceptionWrapper.TriggerException: Something's not quite right. Try your action again, and if the issue continues, contact your administrator for help.: unexpected token: 'SUM()' (System Code)" or "FinServ.FinancialAccountRoleTrigger: execution of AfterInsert caused by: FinServ.MoiExceptionWrapper.TriggerException: unexpected token: 'MAX()' (System Code)".
The trigger fires whenever a Financial Account or Financial Account Role insert, update, or status change occurs (for example, changing Status [FinServ__Status__c] to Closed). The exception is raised by the FSC managed package's Rollup By Lookup (RBL) engine when it constructs an aggregate SOQL clause from a Rollup By Lookup Configuration [FinServ__RollupByLookupConfig__c] record whose Field to Rollup From [FinServ__FieldToRollupFrom__c], From Object [FinServ__FromObject__c], or Rollup Operation [FinServ__RollupOperation__c] is blank, inactive, or references a deleted/invalid field.
Affected orgs run the Financial Services Cloud managed package in Lightning Experience on Enterprise or Unlimited Edition. RBL rules apply only to Assets and Liabilities, Claims, Financial Accounts, Financial Account Roles, Insurance Policies, and Revenues.
Follow these steps in order. The fix targets the Rollup By Lookup configuration that is producing the malformed aggregate clause.
Confirm the issue is resolved by repeating the original failing action — for the Status change scenario, edit the Financial Account record, set Status [FinServ__Status__c] to Closed, and click Save; for the bulk scenario, re-run the upsert job. The save must complete with no FinServ.MoiExceptionWrapper.TriggerException error.
005385084

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.