2

Salesforce is strict on putting items in package. Once we put it in, we cannot remove it out. I know it, but is it possible to hide it (or deprecate it)?

We have an Aura component, which our customer can use in Lightning App Builder.

Now, we developed a LWC which is successor of old Aura component. Displaying it side by side with Aura component in Lightning App Builder may confusing customer.

I want to display LWC only, hide the old Aura component away. If customer is using old Aura component in their custom application, they can just continue using them. They just cannot drag and drop it to their app any more.

Do you have any idea?

UPDATE

Since I cannot add code to comment, I add my trying code here. I have tried below stuffs but it doesn't work:

<!-- 
@deprecated
The component is no longer supported and will be removed in a future release. 
-->
<aura:component ....

Also tried:

<!-- 
@deprecated
The component is no longer supported and will be removed in a future release. 
-->
<design:component ....

But both of them don't work. I still can see it in Lightning App Builder.

2 Answers 2

2

As far as I know, there is no way to deprecate an Aura component in a released package. But you can request for permission to delete it from your package: https://help.salesforce.com/s/articleView?id=000385399&type=1

After deleting the component, you need to release a new package.

The customers who install your new package won't see the Aura component anymore.

The customers who installed your package, now upgrade to your new package will still see the Aura component, because it remains in their org, their admin can now choose to delete it if they want. It's been described here:

When a package developer removes an Aura or Lightning web component from a package, the component remains in a subscriber’s org after they install the upgraded package. The administrator of the subscriber’s org can delete the component, if desired. This behavior is the same for a Lightning web component or an Aura component with a public or global access value. Removing components from 1GP or 2GP managed packages requires approval from Salesforce. To request access to the component removal feature, log a support case in the Salesforce Partner Community.

0

Yes, you can hide the old Aura component in Lightning App Builder so that the customer is no longer confused.

You can accomplish this by deprecating the Aura component in your package. This will prevent the component from being listed in the Lightning App Builder UI, and any existing instances of the component will continue to work. However, new instances of the component will not be allowed.

<!-- 
@deprecated
The component is no longer supported and will be removed in a future release. 

-->

After you've added the @deprecated tag, the component will no longer appear in the Lightning App Builder UI and new instances of the component will not be allowed. However, any existing instances of the component will continue to work as expected

1
  • Where do I put your sample code? I did add it to my Aura component code but it doesn't work. You may see in my UPDATE part in the question. Feb 16 at 2:17

You must log in to answer this question.

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