DEV Community

leelasairam
leelasairam

Posted on

How to retrieve specific LWC code from org

Sometimes we may have to work on the LWC which was deployed by some other. In such cases, we may not have the code on our local machine.

To pull the component's code from the org, we can use the below command

sfdx force:source:retrieve -m LightningComponentBundle:[cmpName]

Enter fullscreen mode Exit fullscreen mode

Note :

  1. Make sure Salesforce CLI is installed on your machine.
  2. Make sure after creating the project (SFDX: Create Project), authorize the Salesforce Org. To authorize, run SFDX: Authorize an Org command in the VSCode terminal.

Top comments (0)