Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More

Deployment Fails with "Invalid type: CaseRelatedFile" When Deploying RosterEntitiesCreationTrigger

Publish Date: Jul 9, 2026
Description

 When deploying an unmanaged package or changeset containing RosterEntitiesCreationTrigger , the deployment fails with the following error:

 

Status: Failed

Deployment CompleteTest failure, method: RosterEntitiesCreationTrigger. -- line 3, column 5: Invalid type: CaseRelatedFile stack null

This error occurs because RosterEntitiesCreationTrigger references the CaseRelatedFile entity, which is part of the Provider Network Management feature in Health Cloud.
If the Target org does not have the Provider Network Management  license, the 
CaseRelatedFile entity is not available, making the trigger invalid and causing deployment and code coverage failures.                              

Resolution

Option 1 — Remove the trigger

Remove the RosterEntitiesCreationTrigger  if the PNM feature is not in use:                                                                                 

Option 2 — Acquire the Provider Network Management License

Contact your Salesforce Account Executive to provision the Provider Network Management license. Once licensed, redeploy the trigger.                                             

  

Knowledge Article Number

005388481

 
Loading
Salesforce Help | Article