2

Got a first-generation managed package distributed to a small number of Orgs (<10). In the early design, several classes were setup with the global instead of public attribute thinking we might have several packages that would reuse elements (before packages with the same namespace could share).

Salesforce Support turned on component deletion. Unfortunately, three Apex classes can't be deleted. If I try to change them from global to public, I get this error:

Error: Compile Error: Global/WebService identifiers cannot be removed from managed application: XXXNAMESPACEXXX.Utils at line 1 column 32

Nothing outside of our managed package uses those classes or properties.

We considered deleting the managed package and recreating it. Then we'd uninstall the old managed package from each org and install the brand new one. Not sure this is possible but there's a Delete button when we view the package in the Package Manager.

If we deleted the original managed package (assuming Salesforce doesn't block that), would the orgs that installed the old version of the managed package still be able to function (temporarily) or would their managed packages stop working the second we delete the managed package from the packaging org?

We don't mind the extra work of reinstallation but we don't want to introduce downtime (more than the 15-20 mins to uninstall/reinstall).

Thoughts?

2 Answers 2

1

If you delete the Managed Package (1GP), any orgs that already have it will be unaffected. However, note that you won't be able to create a new managed package in that org if you delete your package. Ultimately, it doesn't matter if you delete the package though, as I'd recommend you just leave it be and start a Second Generation Managed Package (2GP). You can enable an org as your Dev Hub org (normally, production), then link your namespace to that org. Once you enable Dev Hub, and link your namespace, you'll be able to create an unlimited number of 2GP packages that can share code through the NamespaceAccessible annotation. Note that a 1GP and 2GP cannot be installed in the same org, so you'll still have to uninstall the old version before installing the new version.

1
  • 1
    If you are an ISV partner, then the dev hub has to be your PBO (by Salesforce edict), which is essentially the equivalent of "production" for a Salesforce customer.
    – Phil W
    Commented Jan 24, 2023 at 16:19
1

Got some guidance from a Salesforce Support person that we can revert our managed package versions to beta so we can fix the problems that could not be solved by deleting components. They referenced this article: https://help.salesforce.com/s/articleView?id=000381570&type=1.

We are going to move to a second-generation managed package and have a Dev Hub. But we want to recreate the ConnectedApps with some changes, re-release the 1GP then move to the 2GP since Connected App support requires a 1GP release.

Incidentally, has anyone else noticed how much Salesforce Support has improved recently?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .