0

I want to change my application label as shown in app home page.

We are using CustomApplication in 1GP managed package(<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata>)

Label is changed only after first install, but not after upgrade of the managed package.

I found this SF documentation, however it does not mention customapplication, only application, and it explicitly says component can be updated during package upgrade :

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/packaging_packageable_components.htm#mdc_application

Any ideas?

1 Answer 1

2

"Application" is one and the same as "CustomApplication" - the metadata is stored in the "applications" folder in SFDX source project structures and with the ".app-meta.xml" extension, but uses the CustomApplication element as the root of the metadata XML.

As you noted, the documentation specifically states that:

Both Package Developer and Subscriber Can Edit

All attributes, except App Name and Show in Lightning Experience (Salesforce Classic only)

All attributes, except Developer Name, Selected Items, and Utility Bar (Lightning Experience only)

When both the package developer and subscriber can edit a value (similar to what happens with page layouts) changes made by the package developer do not get applied during upgrade just in case the subscriber has changed that value. That includes "label" in this case.

I believe, therefore, there's nothing you can do to update the label automatically during upgrade without jumping hoops and using the Apex Metadata API to overwrite that label. Note that using this from a post install script is challenging due to the fact that the running user is the "ghost user", and this fake user has some specific limitations.

Additionally, the whole point here is that the subscriber might have changed the label themselves, so really you should leave it alone. New installs will see the new label, old installs get to see the old one (or subscriber customized value).

2
  • Thx for the detailed answer! Sep 8, 2022 at 7:29
  • @shakedmezuman I hope it helps. Feel free to upvote and mark as best answer if it provides all the detail you need.
    – Phil W
    Sep 8, 2022 at 8:04

You must log in to answer this question.

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