function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gpforcegpforce 

Unable to update namespace of custom labels in managed package

Hi,
I have a lightning component as part of a managed package that uses few custom labels. The custom labels are saved with the default namespace like "{!$Label.c.<label_name>}". I am trying to update this line with the relevent namespace like "{!$Label.<nameSpace>.<label_name>}". After changing the namespace and saving the component successfully, on refreshing the code reverts to te default namespace i.e. "{!$Label.c.<label_name>}". Is this a known behavior or bug? Could not find any official documentation.
NagendraNagendra (Salesforce Developers) 
Hi,

It's a feature, not a bug. Your local code should always be referenced with the "c" namespace. When uploaded in a managed package, it will be referenced correctly. This feature allows you to develop your code in a non-namespaced org, then migrate to a managed package org without having to update your code.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra