Skip to main content

Create Salesforce DX Project using VisualStudio Code and Salesforce DX

This blog covers a quick starter guide to setup a Salesforce DX Project using Visual Studio Code. It also provides some good links to take this topic further on.

Topics Covered

  • What is VSCode with Salesforce DX Extension Pack?
  • How to create a Salesforce Project using DX?
  • Authenticate Project with and existing Org
  • Understand Source Directory Structure
  • Open linked Salesforce Environment through VSCode

Question: What is Salesforce DX?
Answer: Salesforce DX stands for Developer Experience which provides a new way to Manage Apps and Development of Code in Salesforce. At its core, it implements the idea of Source Driven Development, where developers would not have to login into Salesforce environment for their development. It is a Command Line Interface (CLI) tool.

Question: How is Salesforce DX Project structure different from Classic Project Structure?
Answer: Projects created through DX has more granular handle over its component compared to Classic Project Metadata. In other word, for example, changes to a field in an Object would require a code push only for that particular field compared to entire Object.
Salesforce DX Project Structure and Source Format



Question: How to install and configure VS Code for Salesforce Development?
AnswerSetup your Salesforce DX Environment

Question: I already have a Salesforce Project, is there a way to convert it into Source Format, the new structure of the Project?
Answer:

Option-1:

  • Create a Salesforce Project using "SFDX: Create Project using Manifest"
  • Copy your existing (Eclipse) package.xml into meta-inf/package.xml file
  • Retrieve the source from the Org.


Option-2:


Question: I have created a VS Code Project. Now I want to retrieve the meta-data from the Development Sandbox. Basically, I want to see entire or limited number of meta-data from the Salesforce implementation project. How do I do that?
Answer: This can be done in limited scenario. There are two ways to create Project VSCode and they are (a) SFDX: Create Project (b) SFDX: Create Project with Manifest.
Option (a) creates project with New meta-data format. This method doesn't provide a way to deploy or retrieve a set of meta-data. Retrieve and Deploy command will only be applicable to the meta-data already sitting in the project folder structure. Future enhancements are coming soon on this. Org Browser #862.
Option (b) creates project similar to legacy Force.com IDE format with a manifest/package.xml file. The content of package.xml file will decide which meta-data to deploy or retrieve.

Reference

Comments

Popular posts from this blog

Product Evaluation - MuleSoft Anypoint Platform one day workshop

People, Business Executives, Enterprise Architects, Solution/System/Application Architects, Tech Leads, Developers,  who are looking for and want to know more about MuleSoft Integration offering which is compared to other key providers like Software AG WebMethods, Oracle SOA Suite, WSO2, Informatica, etc. Recently I attended a one day Workshop on MuleSoft Anypoint platform . The overall goal of this workshop was to evaluate MuleSoft integration technology offering for a mid-size integration environment which is currently supported through Software AG WebMethods and Oracle SOA Suite. So, if you are in process of evaluating MuleSoft Anypoint Platform for your integration needs, this write up will give you a good high level executive summary overview. MuleSoft Product Offering falls under following category of market offering: iPaaS (Integration Platform as a Service) Hybrid Integration On-Premise Integration Platform Internet of Things (#IOT) Integration Mule

Salesforce - Scheduling a Schedule Job

Following are the different ways to schedule a Schedule Job through a script. Run the given code in Execute Anonymous window and then you could see in Setting -> 'Scheduled Job' that your Job is waiting to be executed. Run a Schedule Job NOW Method - 1 ScheduleSalesTargets c = new ScheduleSalesTargets(); c.execute(null); Method - 2  (This one I prefer, whenever I need to run a job) Check the current Time. If it is, let's say 10:39 AM, in your clock, then set the minute to 41. This will schedule the job for 10:41 AM just two minutes from now. But, if you set minute value to 38, then it will schedule to next hour 11:38 AM ScheduleSales c = new ScheduleSales(); String sch = '0 0 * * * ?'; System.schedule('Sales Job Name - 1',  '0 41 * * * ?', c); You could repeat following, so that job keeps running every 5 minutes while you debug and change the Apex code behind the scene. ScheduleSales c = new ScheduleSales(); String sch = &#

Salesforce - Microsoft Power BI

This document outlines basic steps to install and configure Power BI with Salesforce. Usage / Highlights Retrieve User Data from Salesforce Retrieve Reports from Salesforce Read Only Access to Salesforce Connection to Salesforce is made on behalf of User. In other words, Login Session belongs to the User. Power BI utilises Salesforce OAuth security framework to connect to Salesforce Previous version of Power BI used to be Power Query, but not supported for TLS 1.1 or higher, thus could not connect to Salesforce after TLS 1.1 Security upgrade. Find details on Power Query Installation  here . Installation - Power BI Publisher for Excel Download Link  Download Power BI publisher for Excel Download for Office 64 Bit ( or 32 Bit) as needed. Close Microsoft Office Application Double click the installer file named "PowerBIpublisher_[64bit][en-us].msi" Installation - Power BI Desktop  Follow the guide as provide on this site -  https://powerbi.microsoft.com/e