DEV Community

leelasairam
leelasairam

Posted on

1

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more