Build a Salesforce DX Plugin in 15 Min – Dreamforce 2018

Build a Salesforce DX plugin in Dreamforce 2018 within 15 minutes

Before deploying metadata in Sandbox of production, have you felt that how great it would be to generate configuration workbook ? Or compare sandboxes for difference ? Or check if fields are used on any page layouts or not ? Dear reader, you are in need of custom Salesforce DX plugin.

You heard it right, Salesforce DX allows custom plugin development. So now question is, how do you connect to Salesforce Org ? Do you need to know about OAuth or Single Sign On (SSO) ?

Give your 15 minutes to me & Abhishek in Dreamforce and we would show tricks and basics of building Salesforce DX in snap of the fingers. Make sure to add this session in your agenda.

Not coming to Dreamforce ? No worries, come back on this post and I would share complete source code and how plugin can be built in 15 minutes.

Using SalesforceDX (SFDX) with non Scratch Orgs

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags , with 10 Comments on Using SalesforceDX (SFDX) with non Scratch Orgs

How to use SalesforceDX (SFDX) with Sandbox, Developer and Production Orgs

We have gone through few blog posts about SFDX and its capabilities in past. In this post, I will explain steps on how to use SFDX with developer, Sandbox or Production Org. In short we will discuss how to use SFDX with non Scratch Orgs. We would be using official Salesforce IDE for SFDX, which is VSCode.

Assumption – VSCode extension is already installed in your VSCode.

  1. Create SFDX project in VSCode

Open VScode and press cmd+Shift+p, It will give some option. Select SFDX: Create Project.

SFDX : Create Project
SFDX : Create Project

Continue reading “Using SalesforceDX (SFDX) with non Scratch Orgs”

Introduction to Lightning Test Services with Jasmine

Complete Source code and video of using Lightning Datatable Component and Jasmine in Salesforce

In previous post, we discussed what is Jasmine and simple hello world program to see how it works. In this blog post, we will discuss how Jasmine can be used in Salesforce to test Lightning Component’s Javascript code.

Note : Everything we are discussing here is completely covered as part of Live coding in Apex Salesforce Saturday organized by Amit. Would like to thank Mohith for his support and answers during the demo. It also shows How SalesforceDX can be used daily by developers to perform development.

Jasmine and Mocha support is provided as a part of Lightning Test Service (LTS) by Salesforce. Jasmine and Mocha, both are well known and industry wide solution accepted in Javascript world. of course, Salesforce don’t want to stay behind in terms of its offering to developers thats why we have new baby in town – Lightning Test Service (LTS). Continue reading “Introduction to Lightning Test Services with Jasmine”

Import and Export Records using Salesforce DX

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags , , with 6 Comments on Import and Export Records using Salesforce DX

Using Salesforce DX to Export and Import records into regular Salesforce Instances without dependency on developer hub org

In today’s continuous integration solution built for Salesforce, if you need to load sample data into Salesforce then either we use command line dataloader or custom tool built to import export records.

With Salesforce DX, we can import and export records right from Salesforce DX. Again, if you are new to Salesforce DX, then first read this blog post to quickly understand what is Salesforce DX. 

We don’t need Developer Hub or Scratch Orgs to use Salesforce DX for import and export. In this blog post, I have used my regular developer org for demo.

First step as always, to make sure if Salesforce DX CLI is connected to your Org or not ? If its not connected then use below command to connect and give alias which is easy to remember. Continue reading “Import and Export Records using Salesforce DX”

Use Metadata API with Salesforce DX

How to use SalesforceDX to deploy metadata in Sandboxes or Non-Scratch Salesforce instances

If you have existing VCS which stores metadata information about your Salesforce instance in old format, dependent on package.xml and you want to use Salesforce DX then this blog post is for you. As you might already know, Salesforce DX does not need package.xml and can automatically detect changes in your Salesforce instance, therefore new Salesforce DX project format is different. In this blog post we will see, how Salesforce DX can be used without enabling Developer Hub and using Salesforce DX with normal Salesforce instances.

There are two solution to this problem

  1. Keep using old Project format and use Metadata API to retrieve and deploy
  2. Convert old project format to Salesforce DX project Format

Continue reading “Use Metadata API with Salesforce DX”

Getting started with Salesforce DX – Salesforce Developer Experience

Introduction and basics of Salesforce Developer Experience (Salesforce DX) with source code and Video tutorials

Important : At time of writing this post, Salesforce DX is in pilot phase. Mostly any product in Salesforce goes from Pilot to Beta and then Generally available. There is no guarantee that if this product is released, it would work like exactly same as written in this post.

Table of Content

If we already have Salesforce Metadata API, Force.com IDE and other tools then why do we need one more tool like Salesforce DX ?

In tools like Changeset, Metadata API or Force.com IDE, source of truth is Sandbox. Although we can setup process and continuous integration (CI) to use some source code management (SCM) like Git or SVN. However these kind of setup takes time, expertise and lot of effort.

Salesforce DX not only solves above problem but

  • Ability to consider SCM as source of truth
  • Use any favorite IDE or any SCM
  • Powerful CLI to help minimizing complexity of setting up CI
  • Updated Force.com IDE to support Salesforce DX if you are not comfortable with CLI
  • and most important, spin off Scratch Orgs within minutes through script to quickly work on POC or package based development

What are scratch Orgs ?

Salesforce DX can be enabled for any Salesforce instance and they are known as Developer Hub. One Developer Hub can have multiple Scratch Orgs. Scratch Orgs are temporary Salesforce org which can be created quickly and metadata can be deployed from SCM. These kind of Orgs can be used by developers to perform quick proof of concept or build and test packages. Once package is build and saved back on SCM, scratch org can be destroyed easily. Continue reading “Getting started with Salesforce DX – Salesforce Developer Experience”