salesforce local env 配置 本地环境

IDE

Salesforce Extension Pack + VS Code (Highly Recommended)

This is the current Salesforce Official IDE providing full support for both traditional Sandbox (which is what we are doing in Harmoney) and Scratch Org development.

Set Up Steps

At this point, you should have the IDE setup done, following the steps to start APEX code development with sandbox 

Get Started

  • First, open VS Code and create a project. To create a project with a manifest, open the command palette (press Ctrl+Shift+P on Windows or Linux, or Cmd+Shift+P on macOS) and run SFDX: Create Project with Manifest.
  • Next, authorize the org you want to develop against. To start the login process, open the command palette and run SFDX: Authorize an Org.
  • After you select a login URL and give your project a name, your browser opens and you can log in to your org. After you finish logging in, close the browser and return to VS Code.
  • Retrieve metadata you want to work with from your org is by using a package.xml file in the manifest directory. (You can modify the package.xml yourself to retrieve the necessary metadata – https://developer.salesforce.com/docs/metadata-coverage)
    • ApexClass
    • ApexComponent
    • ApexPage
    • ApexTrigger
  • Save the package.xml file if you make any change, right-click a manifest, in the Visual Studio Code explorer or the editor, then select SFDX: Retrieve Source in Manifest from Org.
  • After the process is done, all the metadata has been pulled into local and you can start coding. 

Full reference of Org Development Model with VS Code – https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model

发表评论

电子邮件地址不会被公开。 必填项已用*标注