DocSF

DocSF

Did You Know?

Docy turns out that context is a key part of learning.

Come creare un nuovo progetto con Salesforce con visual studio code e recuperare i metadata

Breve guida che ci aiuta a ricordarci come creare i progetti su visual studio code e quali comandi sono necessari

  1. Create a project (ctrl + p -> create a project)
  2. crea il workspace (consiglio, dai al workspace lo stesso nome del progetto)
  3. Autorize a org (ctrl + p -> autorize a org)
  4. sfdx force:config:set defaultusername=alias (consiglio, dai all’alias lo stesso nome del progetto)
  5. sfdx force:org:list
  6. sfdx force:org:open -u [alias]
  7. crea la cartella “manifest” sulla document root del progetto
  8. crea il file package.xml dentro la cartella manifest
  9. sfdx force:mdapi:retrieve -r metadata -u alias -k manifest/package.xml
  10. inserisci questa riga in settings.json (“salesforcedx-vscode-core.push-or-deploy-on-save.enabled”: true,)

Package xml di esempio completto anche di LWC

<?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>LightningComponentBundle</name>
    </types>
    <types>  
        <members>*</members>  
        <name>AuraDefinitionBundle</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>StaticResource</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomApplication</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ApprovalProcess</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>AssignmentRule</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>AuthProvider</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CallCenter</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Community</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ConnectedApp</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomApplicationComponent</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomMetadata</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomPermission</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Dashboard</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>DataCategoryGroup</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Document</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>EmailTemplate</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>EntitlementProcess</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>EntitlementTemplate</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>FlexiPage</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Flow</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Group</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>HomePageComponent</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>HomePageLayout</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomLabels</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Layout</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>MilestoneType</name>  
    </types>  
    <types>           
        <members>*</members>  
        <name>CustomObject</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Letterhead</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomObjectTranslation</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>PermissionSet</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>PostTemplate</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Profile</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Queue</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>QuickAction</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>RemoteSiteSetting</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ReportType</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Workflow</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Report</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>SiteDotCom</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomSite</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Scontrol</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Settings</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomTab</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Translations</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomPageWebLink</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Role</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>SamlSsoConfig</name>  
    </types>  
    <version>44.0</version>  
</Package> 

Related Post

17 domande e risposte sul mondo SalesForce

Nel momento in cui scrivo, ancora non sono uno sviluppa...

Salesforce Lightning redirect to other compon

Ho avuto necessità di inviare l'utente ad un altro lig...

Salesforce Trigger

Sto eseguendo un Trigger per un esercizio. Potrebbe ess...