EmailMessage object has dependency on Email2Case when installing managed package even if Enhanced Email is enabled
Apex , AppExchange , Packaging
Last updated 2022-02-10 ·Reference W-3535445 ·Reported By 2 users
Summary
EmailMessage should not have dependency on Email2Case when installing managed package and Enhanced Email is enabled at the same time
Actual Result:
Request to install package "packagename" was unsuccessful and EmailMessage have dependency on Email2Case
Expected Result:
Should install package successfully and EmailMessage doesn't have dependency on Email2Case.
Repro
1. In your Developer org create a Apex class like below and ensure
@isTest
public class myTest {
static testMethod void myTest() {
EmailMessage em;
}
}
2. Create a package:
From Setup, enter Packages in the Quick Find box, then select Packages.
Click New.
Enter a name for your package. This does not have to be the same name that appears on AppExchange.
From the drop-down menu, select the default language of all component labels in the package.
On the right side of the screen, select the Managed checkbox.
Click Save.
3. Add the necessary components for your app.
Click Add Components.
From the drop-down list, choose the type of component.
Select the components you want to add i.e. the test class above
Click Add To Package
4. Click Upload.
5. On the Upload Package page, You will see that it lists "Email2Case" as a requirement
Finish uploading the package by filling in any required fields. Once upload is complete make sure to copy the installation URL
6. Now go to another org and ensure that enhanced email is enabled first. Then attempt to install the package using the installation URL, you will receive a email with the following message
Your request to install package "packagename" was unsuccessful. None of the data or setup information in your salesforce.com organization was affected.
CAUSE
Missing Organization Feature: Email2Case
Workaround
Enable Email2Case
Reported By (2)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.