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
Naoki Kitaarashi 4Naoki Kitaarashi 4 

How to rename Lightning component

It's a basic question. How to rename Lightning component once created?  I couldn't find any menu on Devloper console and any buttons on Setup|Develop|Lightning Components. Is it necessary to delete and create new one with new name?
Best Answer chosen by Naoki Kitaarashi 4
Himanshu ParasharHimanshu Parashar
Hi Naoki,

Yes that is correct. You need to delete the component and create new one with new name.


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

All Answers

Himanshu ParasharHimanshu Parashar
Hi Naoki,

Yes that is correct. You need to delete the component and create new one with new name.


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
This was selected as the best answer
Naoki Kitaarashi 4Naoki Kitaarashi 4
Thanks Himanshu. I got it.
Bode Fuwa 12Bode Fuwa 12
To Delete -> Developer Console -> File (make sure you're in the tab of the lightning component you want to delete) -> click Delete
Pasan   EeriyagamaPasan Eeriyagama
Mahesh AdiMahesh Adi
There is an idea please vote https://success.salesforce.com/ideaView?id=0873A000000cLiqQAE
Mahesh AdiMahesh Adi

Easiest was to provide a new label for the component via the design file.

<design:component label="New Name"> </design:component>

Krish Sana11Krish Sana11
From another post: https://www.codescience.com/blog/2017/how-to-rename-lightning-component-bundles
 
Karthik Raja MKarthik Raja M
We can run below query in developer console query editor. It will return all the aura component name in DeveloperName column.
SELECT Id, DeveloperName, MasterLabel FROM AuraDefinitionBundle
Now we can edit Developer Name, MasterLabel and save it. It will reflect all the place wherever the component is used. If you are using the component in controller and helper, It will reflect there also.
KCali12KCali12
Karthik's solution worked perfectly!  Thanks!
Usman Ali 7967Usman Ali 7967
Hi Naoki, 

You can use dataloader and update records in the table "AuraDefinationBundle" .The developerName is the field that needs to be updated.
Please note you need dataloader or workbench since the object is not accessible via apex.

Best, 
Usman Ali
nandan.kollinandan.kolli
Try to use the Developer Console Query Editor and update the names of the Lightning Components to see what happens. Run this query in the Query Editor.
Select Id, DeveloperName from AuraDefinitionBundle

Edit developer name --> save

Work Done.
sachinarorasfsachinarorasf
Hi Hassaan,

Please go through the below code.

https://www.tutorialkart.com/salesforce/salesforce-lightning-expression-component/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Sachin Arora
www.sachinsf.com
Deez LoadDeez Load
priyanshu nema 2priyanshu nema 2

Hi,

you do not need to delete existing component, 

Let's try to use the Developer Console Query Editor and update the names of the Lightning Components to see what happens. Run this query in the Query Editor.
Select Id, DeveloperName from AuraDefinitionBundle

Edit developer name --> save

Dave MeixnerDave Meixner

On the Macintosh side you can run the query mentioned:
Select Id, DeveloperName from AuraDefinitionBundle

Using one of my favorite well maintained free apps from Pocket Soap: SoqlX (https://www.pocketsoap.com/osx/soqlx/)
or https://www.pocketsoap.com

Barla SridharBarla Sridhar
from develper console 
Select Id, DeveloperName,MasterLabel,ApiVersion,Description from AuraDefinitionBundle  update the required information 
Henry MogridgeHenry Mogridge
Thank you x 1m Karthik!!!  (Karthik Raja M)