Salesforce系列(0):一次拉取多个文件或全部文件至本地

📖摘要


在开发中,经常会遇到本地工程错乱或者误操作导致本地本地项目被删除,此时利用SFDX: Retrieve Source from Org只会拉取新建并且名称相同的组件,若通过创建一个个文件,然后再拉取的方式,不免显得过于笨拙。

本人便踩过这个坑,这里分享一下个人的解决方案。


🌂解决方案

在我看来,从Org中一次拉取多个组件文件或者全部组件文件,有三种解决方案,下面一一叙述:

  1. 利用manifest新建工程
  2. 利用Package Manage方式自由拉取文件(后面再讲)
  3. 利用Scratch Org全部拉取

开始开始

一、利用manifest新建工程

1)打开Vs Code,进入命令行模式(shift+cmmand+p/F1), SFDX: Create Project with Manifest在这里插入图片描述

直接创建标准模式即可,当然可根据自身实际选择。这里直接创建工程,在PSBU/manifest目录下,可发现名为package.xml的文件,标准内容如下:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTestSuite</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>*</members>
        <name>AuraDefinitionBundle</name>
    </types>
    <types>
        <members>*</members>
        <name>LightningComponentBundle</name>
    </types>
    <types>
        <members>*</members>
        <name>StaticResource</name>
    </types>
    <version>47.0</version>
</Package>

从packge.xml文件中可以看出,主要分为一下标准类型:

  • ApexClass: Apex类文件
  • ApexComponent: Apex组件
  • ApexPage: Visualforce组件
  • ApexTestSuite: Apex测试类
  • ApexTrigger: Apex的触发问价
  • AuraDefinitionBundle: Apex的自定义Aura组件
  • LightningCompentBundle: Apex的自定义LWC组件
  • StaticResource: 项目中的静态文件

2)认证Org并设置为默认Org

# 认证Org
SFDX: Authorize an Org
# 设置默认Org
SFDX: Set a Default Org

查看Org列表

Starting SFDX: Set a Default Org

xxxxxx sfdx force:config:set defaultusername=vscodeOrg
=== Set Config
NAME             VALUE
───────────────  ─────────
defaultusername  vscodeOrg
xxxxx sfdx force:config:set defaultusername=vscodeOrg ended with exit code 0

3) 利用pacakge.xml拉取文件

**右击sample/manifest/pacakge.xml,选择SFDX: Retrieve Source in Manifest from Org。

Starting SFDX: Retrieve Source from Org

16:12:56.549 sfdx force:source:retrieve --manifest e:\专用项目存储目录\dcit\PSBU\manifest\package.xml
=== Retrieved Source
FULL NAME                                                             TYPE                  PROJECT PATH
────────────────────────────────────────────────────────────────────  ────────────────────  ────────────────────────────────────────────────────────────────────────────────────────────────
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples.resource-meta.xml
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\clock.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\construction.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\force_logo.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\maintenance.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\poweredby.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\tools.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\unauthorized.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\img\warning.png
SiteSamples                                                           StaticResource        force-app\main\default\staticresources\SiteSamples\SiteStyles.css
TipsLogo2                                                             StaticResource        force-app\main\default\staticresources\TipsLogo2.resource-meta.xml
TipsLogo2                                                             StaticResource        force-app\main\default\staticresources\TipsLogo2.png
TipsLogo3                                                             StaticResource        force-app\main\default\staticresources\TipsLogo3.resource-meta.xml
TipsLogo3                                                             StaticResource        force-app\main\default\staticresources\TipsLogo3.png
jQuery                                                                StaticResource        force-app\main\default\staticresources\jQuery.resource-meta.xml
jQuery                                                                StaticResource        force-app\main\default\staticresources\jQuery.js
jQuery_LookupCmp                                                      StaticResource        force-app\main\default\staticresources\jQuery_LookupCmp.resource-meta.xml
jQuery_LookupCmp                                                      StaticResource        force-app\main\default\staticresources\jQuery_LookupCmp\Bootstrap_v3_3_4.js
jQuery_LookupCmp                                                      StaticResource        force-app\main\default\staticresources\jQuery_LookupCmp\jQuery1_11_2.js
NoticeLogo2                                                           StaticResource        force-app\main\default\staticresources\NoticeLogo2.resource-meta.xml
NoticeLogo2                                                           StaticResource        force-app\main\default\staticresources\NoticeLogo2.jpeg
LoginLogoImage                                                        StaticResource        force-app\main\default\staticresources\LoginLogoImage.resource-meta.xml
LoginLogoImage                                                        StaticResource        force-app\main\default\staticresources\LoginLogoImage.jpeg
AnnouncementImage                                                     StaticResource        force-app\main\default\staticresources\AnnouncementImage.resource-meta.xml
AnnouncementImage                                                     StaticResource        force-app\main\default\staticresources\AnnouncementImage.png
FootLogoImage                                                         StaticResource        force-app\main\default\staticresources\FootLogoImage.resource-meta.xml
FootLogoImage                                                         StaticResource        force-app\main\default\staticresources\FootLogoImage.jpeg
LoginFormFooter\LoginFormFooter.cmp                                   AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooter.cmp-meta.xml
LoginFormFooter\LoginFormFooterController.js                          AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooterController.js
LoginFormFooter\LoginFormFooterHelper.js                              AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooterHelper.js
LoginFormFooter\LoginFormFooter.cmp                                   AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooter.cmp
LoginFormFooter\LoginFormFooter.css                                   AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooter.css
LoginFormFooter\LoginFormFooter.auradoc                               AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooter.auradoc
LoginFormFooter\LoginFormFooterRenderer.js                            AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooterRenderer.js
LoginFormFooter\LoginFormFooter.design                                AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooter.design
LoginFormFooter\LoginFormFooter.svg                                   AuraDefinitionBundle  force-app\main\default\aura\LoginFormFooter\LoginFormFooter.svg
datatableSimilarProjectList\datatableSimilarProjectList.cmp           AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectList.cmp-meta.xml
datatableSimilarProjectList\datatableSimilarProjectList.auradoc       AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectList.auradoc
datatableSimilarProjectList\datatableSimilarProjectListRenderer.js    AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectListRenderer.js
datatableSimilarProjectList\datatableSimilarProjectList.design        AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectList.design
datatableSimilarProjectList\datatableSimilarProjectList.svg           AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectList.svg
datatableSimilarProjectList\datatableSimilarProjectListHelper.js      AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectListHelper.js
datatableSimilarProjectList\datatableSimilarProjectList.css           AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectList.css
datatableSimilarProjectList\datatableSimilarProjectList.cmp           AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectList.cmp
datatableSimilarProjectList\datatableSimilarProjectListController.js  AuraDefinitionBundle  force-app\main\default\aura\datatableSimilarProjectList\datatableSimilarProjectListController.js
forgotPassword\forgotPassword.cmp                                     AuraDefinitionBundle  force-app\main\default\aura\forgotPassword\forgotPassword.cmp-meta.xml
forgotPassword\forgotPassword.design                                  AuraDefinitionBundle  force-app\main\default\aura\forgotPassword\forgotPassword.design
forgotPassword\forgotPassword.css                                     AuraDefinitionBundle  force-app\main\default\aura\forgotPassword\forgotPassword.css
forgotPassword\forgotPasswordHelper.js                                AuraDefinitionBundle  force-app\main\default\aura\forgotPassword\forgotPasswordHelper.js
forgotPassword\forgotPasswordController.js                            AuraDefinitionBundle  force-app\main\default\aura\forgotPassword\forgotPasswordController.js
forgotPassword\forgotPassword.cmp                                     AuraDefinitionBundle  force-app\main\default\aura\forgotPassword\forgotPassword.cmp
datatableFSC\datatableFSC.cmp                                         AuraDefinitionBundle  force-app\main\default\aura\datatableFSC\datatableFSC.cmp-meta.xml
datatableFSC\datatableFSC.cmp                                         AuraDefinitionBundle  force-app\main\default\aura\datatableFSC\datatableFSC.cmp
datatableFSC\datatableFSCController.js                                AuraDefinitionBundle  force-app\main\default\aura\datatableFSC\datatableFSCController.js
datatableFSC\datatableFSC.design                                      AuraDefinitionBundle  force-app\main\default\aura\datatableFSC\datatableFSC.design
selfRegister\selfRegister.cmp                                         AuraDefinitionBundle  force-app\main\default\aura\selfRegister\selfRegister.cmp-meta.xml
selfRegister\selfRegister.design                                      AuraDefinitionBundle  force-app\main\default\aura\selfRegister\selfRegister.design
selfRegister\selfRegister.css                                         AuraDefinitionBundle  force-app\main\default\aura\selfRegister\selfRegister.css
selfRegister\selfRegisterHelper.js                                    AuraDefinitionBundle  force-app\main\default\aura\selfRegister\selfRegisterHelper.js
selfRegister\selfRegisterController.js                                AuraDefinitionBundle  force-app\main\default\aura\selfRegister\selfRegisterController.js
selfRegister\selfRegister.cmp                                         AuraDefinitionBundle  force-app\main\default\aura\selfRegister\selfRegister.cmp
EvtChangeLookup\EvtChangeLookup.evt                                   AuraDefinitionBundle  force-app\main\default\aura\EvtChangeLookup\EvtChangeLookup.evt-meta.xml
EvtChangeLookup\EvtChangeLookup.evt                                   AuraDefinitionBundle  force-app\main\default\aura\EvtChangeLookup\EvtChangeLookup.evt
demo\demo.app                                                         AuraDefinitionBundle  force-app\main\default\aura\demo\demo.app-meta.xml
demo\demo.app                                                         AuraDefinitionBundle  force-app\main\default\aura\demo\demo.app
EvtClearLookup\EvtClearLookup.evt                                     AuraDefinitionBundle  force-app\main\default\aura\EvtClearLookup\EvtClearLookup.evt-meta.xml
EvtClearLookup\EvtClearLookup.evt                                     AuraDefinitionBundle  force-app\main\default\aura\EvtClearLookup\EvtClearLookup.evt
CmpPills\CmpPills.cmp                                                 AuraDefinitionBundle  force-app\main\default\aura\CmpPills\CmpPills.cmp-meta.xml
CmpPills\CmpPills.css                                                 AuraDefinitionBundle  force-app\main\default\aura\CmpPills\CmpPills.css
CmpPills\CmpPillsHelper.js                                            AuraDefinitionBundle  force-app\main\default\aura\CmpPills\CmpPillsHelper.js
CmpPills\CmpPillsController.js                                        AuraDefinitionBundle  force-app\main\default\aura\CmpPills\CmpPillsController.js
CmpPills\CmpPills.cmp                                                 AuraDefinitionBundle  force-app\main\default\aura\CmpPills\CmpPills.cmp
EvtInitLookup\EvtInitLookup.evt                                       AuraDefinitionBundle  force-app\main\default\aura\EvtInitLookup\EvtInitLookup.evt-meta.xml
EvtInitLookup\EvtInitLookup.evt                                       AuraDefinitionBundle  force-app\main\default\aura\EvtInitLookup\EvtInitLookup.evt
EvtFilterValue\EvtFilterValue.evt                                     AuraDefinitionBundle  force-app\main\default\aura\EvtFilterValue\EvtFilterValue.evt-meta.xml
EvtFilterValue\EvtFilterValue.evt                                     AuraDefinitionBundle  force-app\main\default\aura\EvtFilterValue\EvtFilterValue.evt
datatableAccount\datatableAccount.cmp                                 AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccount.cmp-meta.xml
datatableAccount\datatableAccount.cmp                                 AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccount.cmp
datatableAccount\datatableAccountHelper.js                            AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccountHelper.js
datatableAccount\datatableAccountController.js                        AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccountController.js
datatableAccount\datatableAccount.auradoc                             AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccount.auradoc
datatableAccount\datatableAccount.css                                 AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccount.css
datatableAccount\datatableAccount.design                              AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccount.design
datatableAccount\datatableAccountRenderer.js                          AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccountRenderer.js
datatableAccount\datatableAccount.svg                                 AuraDefinitionBundle  force-app\main\default\aura\datatableAccount\datatableAccount.svg
LightningLookup\LightningLookup.cmp                                   AuraDefinitionBundle  force-app\main\default\aura\LightningLookup\LightningLookup.cmp-meta.xml
LightningLookup\LightningLookup.css                                   AuraDefinitionBundle  force-app\main\default\aura\LightningLookup\LightningLookup.css
LightningLookup\LightningLookupHelper.js                              AuraDefinitionBundle  force-app\main\default\aura\LightningLookup\LightningLookupHelper.js
LightningLookup\LightningLookupController.js                          AuraDefinitionBundle  force-app\main\default\aura\LightningLookup\LightningLookupController.js
LightningLookup\LightningLookup.cmp                                   AuraDefinitionBundle  force-app\main\default\aura\LightningLookup\LightningLookup.cmp
lookupFSC\lookupFSC.cmp                                               AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSC.cmp-meta.xml
lookupFSC\lookupFSC.svg                                               AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSC.svg
lookupFSC\lookupFSC.design                                            AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSC.design
lookupFSC\lookupFSCRenderer.js                                        AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSCRenderer.js
lookupFSC\lookupFSC.css                                               AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSC.css
lookupFSC\lookupFSCHelper.js                                          AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSCHelper.js
lookupFSC\lookupFSCController.js                                      AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSCController.js
lookupFSC\lookupFSC.cmp                                               AuraDefinitionBundle  force-app\main\default\aura\lookupFSC\lookupFSC.cmp
OpenURL\OpenURL.cmp                                                   AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURL.cmp-meta.xml
OpenURL\OpenURL.cmp                                                   AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURL.cmp
OpenURL\OpenURLController.js                                          AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURLController.js
OpenURL\OpenURLHelper.js                                              AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURLHelper.js
OpenURL\OpenURL.css                                                   AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURL.css
OpenURL\OpenURL.auradoc                                               AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURL.auradoc
OpenURL\OpenURLRenderer.js                                            AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURLRenderer.js
OpenURL\OpenURL.design                                                AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURL.design
OpenURL\OpenURL.svg                                                   AuraDefinitionBundle  force-app\main\default\aura\OpenURL\OpenURL.svg
navigationButtonFSC\navigationButtonFSC.cmp                           AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSC.cmp-meta.xml
navigationButtonFSC\navigationButtonFSCController.js                  AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSCController.js
navigationButtonFSC\navigationButtonFSC.cmp                           AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSC.cmp
navigationButtonFSC\navigationButtonFSC.svg                           AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSC.svg
navigationButtonFSC\navigationButtonFSC.design                        AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSC.design
navigationButtonFSC\navigationButtonFSCRenderer.js                    AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSCRenderer.js
navigationButtonFSC\navigationButtonFSC.auradoc                       AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSC.auradoc
navigationButtonFSC\navigationButtonFSC.css                           AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSC.css
navigationButtonFSC\navigationButtonFSCHelper.js                      AuraDefinitionBundle  force-app\main\default\aura\navigationButtonFSC\navigationButtonFSCHelper.js
setStartUrl\setStartUrl.evt                                           AuraDefinitionBundle  force-app\main\default\aura\setStartUrl\setStartUrl.evt-meta.xml
setStartUrl\setStartUrl.evt                                           AuraDefinitionBundle  force-app\main\default\aura\setStartUrl\setStartUrl.evt
setExpId\setExpId.evt                                                 AuraDefinitionBundle  force-app\main\default\aura\setExpId\setExpId.evt-meta.xml
setExpId\setExpId.evt                                                 AuraDefinitionBundle  force-app\main\default\aura\setExpId\setExpId.evt
loginForm\loginForm.cmp                                               AuraDefinitionBundle  force-app\main\default\aura\loginForm\loginForm.cmp-meta.xml
loginForm\loginFormController.js                                      AuraDefinitionBundle  force-app\main\default\aura\loginForm\loginFormController.js
loginForm\loginForm.cmp                                               AuraDefinitionBundle  force-app\main\default\aura\loginForm\loginForm.cmp
loginForm\loginForm.design                                            AuraDefinitionBundle  force-app\main\default\aura\loginForm\loginForm.design
loginForm\loginForm.css                                               AuraDefinitionBundle  force-app\main\default\aura\loginForm\loginForm.css
loginForm\loginFormHelper.js                                          AuraDefinitionBundle  force-app\main\default\aura\loginForm\loginFormHelper.js
SiteLogin                                                             ApexComponent         force-app\main\default\components\SiteLogin.component-meta.xml
SiteLogin                                                             ApexComponent         force-app\main\default\components\SiteLogin.component
SiteFooter                                                            ApexComponent         force-app\main\default\components\SiteFooter.component-meta.xml
SiteFooter                                                            ApexComponent         force-app\main\default\components\SiteFooter.component
SiteHeader                                                            ApexComponent         force-app\main\default\components\SiteHeader.component-meta.xml
SiteHeader                                                            ApexComponent         force-app\main\default\components\SiteHeader.component
SitePoweredBy                                                         ApexComponent         force-app\main\default\components\SitePoweredBy.component-meta.xml
SitePoweredBy                                                         ApexComponent         force-app\main\default\components\SitePoweredBy.component
BandwidthExceeded                                                     ApexPage              force-app\main\default\pages\BandwidthExceeded.page-meta.xml
BandwidthExceeded                                                     ApexPage              force-app\main\default\pages\BandwidthExceeded.page
FileNotFound                                                          ApexPage              force-app\main\default\pages\FileNotFound.page-meta.xml
FileNotFound                                                          ApexPage              force-app\main\default\pages\FileNotFound.page
SiteTemplate                                                          ApexPage              force-app\main\default\pages\SiteTemplate.page-meta.xml
SiteTemplate                                                          ApexPage              force-app\main\default\pages\SiteTemplate.page
StdExceptionTemplate                                                  ApexPage              force-app\main\default\pages\StdExceptionTemplate.page-meta.xml
StdExceptionTemplate                                                  ApexPage              force-app\main\default\pages\StdExceptionTemplate.page
InMaintenance                                                         ApexPage              force-app\main\default\pages\InMaintenance.page-meta.xml
InMaintenance                                                         ApexPage              force-app\main\default\pages\InMaintenance.page
Exception                                                             ApexPage              force-app\main\default\pages\Exception.page-meta.xml
Exception                                                             ApexPage              force-app\main\default\pages\Exception.page
MyProfilePage                                                         ApexPage              force-app\main\default\pages\MyProfilePage.page-meta.xml
MyProfilePage                                                         ApexPage              force-app\main\default\pages\MyProfilePage.page
SiteRegisterConfirm                                                   ApexPage              force-app\main\default\pages\SiteRegisterConfirm.page-meta.xml
SiteRegisterConfirm                                                   ApexPage              force-app\main\default\pages\SiteRegisterConfirm.page
ForgotPasswordConfirm                                                 ApexPage              force-app\main\default\pages\ForgotPasswordConfirm.page-meta.xml
ForgotPasswordConfirm                                                 ApexPage              force-app\main\default\pages\ForgotPasswordConfirm.page
SiteLogin                                                             ApexPage              force-app\main\default\pages\SiteLogin.page-meta.xml
SiteLogin                                                             ApexPage              force-app\main\default\pages\SiteLogin.page
CommunitiesLanding                                                    ApexPage              force-app\main\default\pages\CommunitiesLanding.page-meta.xml
CommunitiesLanding                                                    ApexPage              force-app\main\default\pages\CommunitiesLanding.page
CommunitiesLogin                                                      ApexPage              force-app\main\default\pages\CommunitiesLogin.page-meta.xml
CommunitiesLogin                                                      ApexPage              force-app\main\default\pages\CommunitiesLogin.page
CommunitiesTemplate                                                   ApexPage              force-app\main\default\pages\CommunitiesTemplate.page-meta.xml
CommunitiesTemplate                                                   ApexPage              force-app\main\default\pages\CommunitiesTemplate.page
AnswersHome                                                           ApexPage              force-app\main\default\pages\AnswersHome.page-meta.xml
AnswersHome                                                           ApexPage              force-app\main\default\pages\AnswersHome.page
CommunitiesSelfRegConfirm                                             ApexPage              force-app\main\default\pages\CommunitiesSelfRegConfirm.page-meta.xml
CommunitiesSelfRegConfirm                                             ApexPage              force-app\main\default\pages\CommunitiesSelfRegConfirm.page
CommunitiesSelfReg                                                    ApexPage              force-app\main\default\pages\CommunitiesSelfReg.page-meta.xml
CommunitiesSelfReg                                                    ApexPage              force-app\main\default\pages\CommunitiesSelfReg.page
IdeasHome                                                             ApexPage              force-app\main\default\pages\IdeasHome.page-meta.xml
IdeasHome                                                             ApexPage              force-app\main\default\pages\IdeasHome.page
UnderConstruction                                                     ApexPage              force-app\main\default\pages\UnderConstruction.page-meta.xml
UnderConstruction                                                     ApexPage              force-app\main\default\pages\UnderConstruction.page
Unauthorized                                                          ApexPage              force-app\main\default\pages\Unauthorized.page-meta.xml
Unauthorized                                                          ApexPage              force-app\main\default\pages\Unauthorized.page
ForgotPassword                                                        ApexPage              force-app\main\default\pages\ForgotPassword.page-meta.xml
ForgotPassword                                                        ApexPage              force-app\main\default\pages\ForgotPassword.page
ChangePassword                                                        ApexPage              force-app\main\default\pages\ChangePassword.page-meta.xml
ChangePassword                                                        ApexPage              force-app\main\default\pages\ChangePassword.page
SiteRegister                                                          ApexPage              force-app\main\default\pages\SiteRegister.page-meta.xml
SiteRegister                                                          ApexPage              force-app\main\default\pages\SiteRegister.page
LoginLogoImage                                                        ApexPage              force-app\main\default\pages\LoginLogoImage.page-meta.xml
LoginLogoImage                                                        ApexPage              force-app\main\default\pages\LoginLogoImage.page
PSBU_AnnouncementImage                                                ApexPage              force-app\main\default\pages\PSBU_AnnouncementImage.page-meta.xml
PSBU_AnnouncementImage                                                ApexPage              force-app\main\default\pages\PSBU_AnnouncementImage.page
FootLogoImage                                                         ApexPage              force-app\main\default\pages\FootLogoImage.page-meta.xml
FootLogoImage                                                         ApexPage              force-app\main\default\pages\FootLogoImage.page
FootImage                                                             ApexPage              force-app\main\default\pages\FootImage.page-meta.xml
FootImage                                                             ApexPage              force-app\main\default\pages\FootImage.page
MyProfilePageControllerTest                                           ApexClass             force-app\main\default\classes\MyProfilePageControllerTest.cls-meta.xml
MyProfilePageControllerTest                                           ApexClass             force-app\main\default\classes\MyProfilePageControllerTest.cls
MyProfilePageController                                               ApexClass             force-app\main\default\classes\MyProfilePageController.cls-meta.xml
MyProfilePageController                                               ApexClass             force-app\main\default\classes\MyProfilePageController.cls
PSBU_SimilarProjectGroupSchedulable                                   ApexClass             force-app\main\default\classes\PSBU_SimilarProjectGroupSchedulable.cls-meta.xml
PSBU_SimilarProjectGroupSchedulable                                   ApexClass             force-app\main\default\classes\PSBU_SimilarProjectGroupSchedulable.cls
ForgotPasswordControllerTest                                          ApexClass             force-app\main\default\classes\ForgotPasswordControllerTest.cls-meta.xml
ForgotPasswordControllerTest                                          ApexClass             force-app\main\default\classes\ForgotPasswordControllerTest.cls
ForgotPasswordController                                              ApexClass             force-app\main\default\classes\ForgotPasswordController.cls-meta.xml
ForgotPasswordController                                              ApexClass             force-app\main\default\classes\ForgotPasswordController.cls
PSBU_OpportunityAttachmentsHandle                                     ApexClass             force-app\main\default\classes\PSBU_OpportunityAttachmentsHandle.cls-meta.xml
PSBU_OpportunityAttachmentsHandle                                     ApexClass             force-app\main\default\classes\PSBU_OpportunityAttachmentsHandle.cls
CommunitiesLandingControllerTest                                      ApexClass             force-app\main\default\classes\CommunitiesLandingControllerTest.cls-meta.xml
CommunitiesLandingControllerTest                                      ApexClass             force-app\main\default\classes\CommunitiesLandingControllerTest.cls
PSBU_OpportunityUnclockRecords_Test                                   ApexClass             force-app\main\default\classes\PSBU_OpportunityUnclockRecords_Test.cls-meta.xml
PSBU_OpportunityUnclockRecords_Test                                   ApexClass             force-app\main\default\classes\PSBU_OpportunityUnclockRecords_Test.cls
PSBU_ProjectSimilarHandleBL                                           ApexClass             force-app\main\default\classes\PSBU_ProjectSimilarHandleBL.cls-meta.xml
PSBU_ProjectSimilarHandleBL                                           ApexClass             force-app\main\default\classes\PSBU_ProjectSimilarHandleBL.cls
CommunitiesLandingController                                          ApexClass             force-app\main\default\classes\CommunitiesLandingController.cls-meta.xml
CommunitiesLandingController                                          ApexClass             force-app\main\default\classes\CommunitiesLandingController.cls
CommunitiesLoginControllerTest                                        ApexClass             force-app\main\default\classes\CommunitiesLoginControllerTest.cls-meta.xml
CommunitiesLoginControllerTest                                        ApexClass             force-app\main\default\classes\CommunitiesLoginControllerTest.cls
CommunitiesLoginController                                            ApexClass             force-app\main\default\classes\CommunitiesLoginController.cls-meta.xml
CommunitiesLoginController                                            ApexClass             force-app\main\default\classes\CommunitiesLoginController.cls
CommunitiesSelfRegConfirmController                                   ApexClass             force-app\main\default\classes\CommunitiesSelfRegConfirmController.cls-meta.xml
CommunitiesSelfRegConfirmController                                   ApexClass             force-app\main\default\classes\CommunitiesSelfRegConfirmController.cls
CommunitiesSelfRegControllerTest                                      ApexClass             force-app\main\default\classes\CommunitiesSelfRegControllerTest.cls-meta.xml
CommunitiesSelfRegControllerTest                                      ApexClass             force-app\main\default\classes\CommunitiesSelfRegControllerTest.cls
PSBU_ProjectDML_Test                                                  ApexClass             force-app\main\default\classes\PSBU_ProjectDML_Test.cls-meta.xml
PSBU_ProjectDML_Test                                                  ApexClass             force-app\main\default\classes\PSBU_ProjectDML_Test.cls
CommunitiesSelfRegController                                          ApexClass             force-app\main\default\classes\CommunitiesSelfRegController.cls-meta.xml
CommunitiesSelfRegController                                          ApexClass             force-app\main\default\classes\CommunitiesSelfRegController.cls
PSBU_OpportunityAttachmentsHandleTest                                 ApexClass             force-app\main\default\classes\PSBU_OpportunityAttachmentsHandleTest.cls-meta.xml
PSBU_OpportunityAttachmentsHandleTest                                 ApexClass             force-app\main\default\classes\PSBU_OpportunityAttachmentsHandleTest.cls
PSBU_ProjectSimilarHandleBL_Test                                      ApexClass             force-app\main\default\classes\PSBU_ProjectSimilarHandleBL_Test.cls-meta.xml
PSBU_ProjectSimilarHandleBL_Test                                      ApexClass             force-app\main\default\classes\PSBU_ProjectSimilarHandleBL_Test.cls
SiteLoginControllerTest                                               ApexClass             force-app\main\default\classes\SiteLoginControllerTest.cls-meta.xml
SiteLoginControllerTest                                               ApexClass             force-app\main\default\classes\SiteLoginControllerTest.cls
SiteLoginController                                                   ApexClass             force-app\main\default\classes\SiteLoginController.cls-meta.xml
SiteLoginController                                                   ApexClass             force-app\main\default\classes\SiteLoginController.cls
PSBU_ProjectDML                                                       ApexClass             force-app\main\default\classes\PSBU_ProjectDML.cls-meta.xml
PSBU_ProjectDML                                                       ApexClass             force-app\main\default\classes\PSBU_ProjectDML.cls
PSBU_OpportunityContentAttachments_Test                               ApexClass             force-app\main\default\classes\PSBU_OpportunityContentAttachments_Test.cls-meta.xml
PSBU_OpportunityContentAttachments_Test                               ApexClass             force-app\main\default\classes\PSBU_OpportunityContentAttachments_Test.cls
ChangePasswordControllerTest                                          ApexClass             force-app\main\default\classes\ChangePasswordControllerTest.cls-meta.xml
ChangePasswordControllerTest                                          ApexClass             force-app\main\default\classes\ChangePasswordControllerTest.cls
LightningLookupControllerTest                                         ApexClass             force-app\main\default\classes\LightningLookupControllerTest.cls-meta.xml
LightningLookupControllerTest                                         ApexClass             force-app\main\default\classes\LightningLookupControllerTest.cls
ChangePasswordController                                              ApexClass             force-app\main\default\classes\ChangePasswordController.cls-meta.xml
ChangePasswordController                                              ApexClass             force-app\main\default\classes\ChangePasswordController.cls
SiteRegisterControllerTest                                            ApexClass             force-app\main\default\classes\SiteRegisterControllerTest.cls-meta.xml
SiteRegisterControllerTest                                            ApexClass             force-app\main\default\classes\SiteRegisterControllerTest.cls
SiteRegisterController                                                ApexClass             force-app\main\default\classes\SiteRegisterController.cls-meta.xml
SiteRegisterController                                                ApexClass             force-app\main\default\classes\SiteRegisterController.cls
LightningLoginFormControllerTest                                      ApexClass             force-app\main\default\classes\LightningLoginFormControllerTest.cls-meta.xml
LightningLoginFormControllerTest                                      ApexClass             force-app\main\default\classes\LightningLoginFormControllerTest.cls
LightningLoginFormController                                          ApexClass             force-app\main\default\classes\LightningLoginFormController.cls-meta.xml
LightningLoginFormController                                          ApexClass             force-app\main\default\classes\LightningLoginFormController.cls
PSBU_OpportunityNewSimilarOppFlow_Test                                ApexClass             force-app\main\default\classes\PSBU_OpportunityNewSimilarOppFlow_Test.cls-meta.xml
PSBU_OpportunityNewSimilarOppFlow_Test                                ApexClass             force-app\main\default\classes\PSBU_OpportunityNewSimilarOppFlow_Test.cls
PSBU_SimilarProjectNameUtils                                          ApexClass             force-app\main\default\classes\PSBU_SimilarProjectNameUtils.cls-meta.xml
PSBU_SimilarProjectNameUtils                                          ApexClass             force-app\main\default\classes\PSBU_SimilarProjectNameUtils.cls
LightningForgotPasswordController                                     ApexClass             force-app\main\default\classes\LightningForgotPasswordController.cls-meta.xml
LightningForgotPasswordController                                     ApexClass             force-app\main\default\classes\LightningForgotPasswordController.cls
LightningSelfRegisterController                                       ApexClass             force-app\main\default\classes\LightningSelfRegisterController.cls-meta.xml
LightningSelfRegisterController                                       ApexClass             force-app\main\default\classes\LightningSelfRegisterController.cls
PSBU_OpportunityConflictProjectHandle                                 ApexClass             force-app\main\default\classes\PSBU_OpportunityConflictProjectHandle.cls-meta.xml
PSBU_OpportunityConflictProjectHandle                                 ApexClass             force-app\main\default\classes\PSBU_OpportunityConflictProjectHandle.cls
LightningSelfRegisterControllerTest                                   ApexClass             force-app\main\default\classes\LightningSelfRegisterControllerTest.cls-meta.xml
LightningSelfRegisterControllerTest                                   ApexClass             force-app\main\default\classes\LightningSelfRegisterControllerTest.cls
LightningForgotPasswordControllerTest                                 ApexClass             force-app\main\default\classes\LightningForgotPasswordControllerTest.cls-meta.xml
LightningForgotPasswordControllerTest                                 ApexClass             force-app\main\default\classes\LightningForgotPasswordControllerTest.cls
PSBU_SimilarPjDataHandleSchedulable                                   ApexClass             force-app\main\default\classes\PSBU_SimilarPjDataHandleSchedulable.cls-meta.xml
PSBU_SimilarPjDataHandleSchedulable                                   ApexClass             force-app\main\default\classes\PSBU_SimilarPjDataHandleSchedulable.cls
PSBU_SimilarPjDataHandleSchedulable_Test                              ApexClass             force-app\main\default\classes\PSBU_SimilarPjDataHandleSchedulable_Test.cls-meta.xml
PSBU_SimilarPjDataHandleSchedulable_Test                              ApexClass             force-app\main\default\classes\PSBU_SimilarPjDataHandleSchedulable_Test.cls
LightningLookupController                                             ApexClass             force-app\main\default\classes\LightningLookupController.cls-meta.xml
LightningLookupController                                             ApexClass             force-app\main\default\classes\LightningLookupController.cls
PSBU_SimilarProjectNameUtils_Test                                     ApexClass             force-app\main\default\classes\PSBU_SimilarProjectNameUtils_Test.cls-meta.xml
PSBU_SimilarProjectNameUtils_Test                                     ApexClass             force-app\main\default\classes\PSBU_SimilarProjectNameUtils_Test.cls
PSBU_OpportunityUnclockRecords                                        ApexClass             force-app\main\default\classes\PSBU_OpportunityUnclockRecords.cls-meta.xml
PSBU_OpportunityUnclockRecords                                        ApexClass             force-app\main\default\classes\PSBU_OpportunityUnclockRecords.cls
PSBU_OverdueProjectBatch                                              ApexClass             force-app\main\default\classes\PSBU_OverdueProjectBatch.cls-meta.xml
PSBU_OverdueProjectBatch                                              ApexClass             force-app\main\default\classes\PSBU_OverdueProjectBatch.cls
PSBU_OpportunityConflictProHandle_Test                                ApexClass             force-app\main\default\classes\PSBU_OpportunityConflictProHandle_Test.cls-meta.xml
PSBU_OpportunityConflictProHandle_Test                                ApexClass             force-app\main\default\classes\PSBU_OpportunityConflictProHandle_Test.cls
PSBU_SimilarProjectGroupSchedulable_Test                              ApexClass             force-app\main\default\classes\PSBU_SimilarProjectGroupSchedulable_Test.cls-meta.xml
PSBU_SimilarProjectGroupSchedulable_Test                              ApexClass             force-app\main\default\classes\PSBU_SimilarProjectGroupSchedulable_Test.cls
PSBU_OpportunityNewSimilarOppFlow                                     ApexClass             force-app\main\default\classes\PSBU_OpportunityNewSimilarOppFlow.cls-meta.xml
PSBU_OpportunityNewSimilarOppFlow                                     ApexClass             force-app\main\default\classes\PSBU_OpportunityNewSimilarOppFlow.cls
CommunitiesSelfRegConfirmControllerTest                               ApexClass             force-app\main\default\classes\CommunitiesSelfRegConfirmControllerTest.cls-meta.xml
CommunitiesSelfRegConfirmControllerTest                               ApexClass             force-app\main\default\classes\CommunitiesSelfRegConfirmControllerTest.cls
PSBU_OpportunityContentAttachmentstrigger                             ApexTrigger           force-app\main\default\triggers\PSBU_OpportunityContentAttachmentstrigger.trigger-meta.xml
PSBU_OpportunityContentAttachmentstrigger                             ApexTrigger           force-app\main\default\triggers\PSBU_OpportunityContentAttachmentstrigger.trigger
PSBU_OpportunityConflictProjectTrigger                                ApexTrigger           force-app\main\default\triggers\PSBU_OpportunityConflictProjectTrigger.trigger-meta.xml
PSBU_OpportunityConflictProjectTrigger                                ApexTrigger           force-app\main\default\triggers\PSBU_OpportunityConflictProjectTrigger.trigger
16:27:37.516 sfdx force:source:retrieve --manifest e:\专用项目存储目录\dcit\PSBU\manifest\package.xml ended with exit code 0

此时,你会发现package.xml中定义的标准组件,都已经成功拉到本地工程。

二、利用Package Manage方式自由拉取文件(后面再讲)
三、利用Scratch Org全部拉取

1)创建Scratch Org

# 创建scratch Org
# 注意,如果没有权限,需进入Org,enable Dev Hub
# 这里使设置有效期为3天
[kaiwu3@localhost:~/smaple/config]$sfdx force:org:create -f project-scratch-def.json -d 3
Successfully created scratch org: 00D9D0000000St7UAE, username: test-l5cwqegykwud@example.comsfdx force:org:create -f project-scratch-def.json -d 3

# 将scratch Org设置为默认Org
[kaiwu3@localhost:~/sample/config]$sfdx force:config:set defaultusername=test-l5cwqegykwud@example.com
=== Set Config
NAME             VALUE
───────────────  ─────────────────────────────
defaultusername  test-l5cwqegykwud@example.com

# 查看Org列表
[kaiwu3@localhost:~/Works/Code/test/config]$sfdx force:org:list
=== Orgs
     ALIAS  USERNAME          ORG ID              CONNECTED STATUS
───  ─────  ────────────────  ──────────────────  ────────────────
(D)  k_Reset kaiwu3@*****.com  00D2v000001Xk5DEAS  Connected

     ALIAS  SCRATCH ORG NAME  USERNAME                       ORG ID              EXPIRATION DATE
───  ─────  ────────────────  ─────────────────────────────  ──────────────────  ───────────────
(U)          kaiwu3 Company    test-l5cwqegykwud@example.com  00D9D0000000St7UAE  2019-11-21

2)全量拉取数据

# 权量拉取命令:sfdx force:source:pull -u {username}
[kaiwu3@localhost:~/sample]$sfdx force:source:pull -u test-l5cwqegykwud@example.com
=== Pulled Source
...

再切换Org即可。


🎉最后

  • 更多参考精彩博文请看这里:《陈永佳的博客》

  • 喜欢博主的小伙伴可以加个关注、点个赞哦,持续更新嘿嘿!

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

陈永佳

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值