This article explains why HealthCloudGA managed-package Apex triggers fail to compile and how to resolve the resulting record-creation block.
"HealthCloudGA.LeadTrigger: execution of BeforeInsert caused by: line 5, column 9: Dependent class is invalid and needs recompilation: Class HealthCloudGA.HcLeadTriggerHandler : Dependent class is invalid and needs recompilation: Class HealthCloudGA.HcLeadService : Dependent class is invalid and needs recompilation: Class HealthCloudGA.ERMLeadService : Invalid type: ContactEncounterParticipant"
"HealthCloudGA.HcCaseTrigger: execution of AfterInsert caused by: ... Dependent class is invalid and needs recompilation: Class HealthCloudGA.HcCaseTriggerHandler : Dependent class is invalid and needs recompilation: Class HealthCloudGA.HcCarePlanService : ... : Field is not writeable: ContactEncounterParticipant.ContactId"
"HealthCloudGA.AccountContactRelationTrigger: execution of BeforeInsert caused by: ... Dependent class is invalid and needs recompilation: Class HealthCloudGA.HcAccountContactRelationTriggerHandler"
Customers describe this as: "When adding a lead I get this error... this just started out of the blue" and "Users cannot create Cases because of a Health Cloud managed package Case trigger that is failing and I cannot disable it."
Root cause: The HealthCloudGA managed-package Apex classes reference the ContactEncounterParticipant standard object. Access to this object is gated by Health Cloud Permission Set Licenses (PSLs), specifically "Contact Center for Health Cloud". When these PSLs expire, are disabled, or are otherwise removed from the org, the ContactEncounterParticipant object is no longer available, the dependent Apex classes become invalid, and every DML operation that fires a HealthCloudGA trigger (Lead BeforeInsert, Case AfterInsert, AccountContactRelation BeforeInsert, etc.) is blocked.
Affected scope: Salesforce orgs (Production and Sandbox) with the HealthCloudGA managed package installed where Health Cloud PSLs have expired or been disabled. All user profiles are affected — the trigger fails before profile-level checks.
Use the cause that matches your situation. Cause 1 applies if you have ever held Health Cloud licenses and they have expired or been disabled. Cause 2 applies only if the Apex classes are stale due to a recent deployment but the Health Cloud PSLs are still active.
Use this path only if the ContactEncounterParticipant object is visible in Object Manager.
Confirm the issue is resolved by attempting to create a new Lead from the Leads tab and a new Case from the Cases tab in the affected org. Both records must save without the "Dependent class is invalid and needs recompilation" error. If you create Account Contact Relationships, also create a new individual or business contact to confirm the AccountContactRelationTrigger compiles.
005385194

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.