Sunday, October 8, 2017

Salesforce DX [Develper Experience] Introduction

Hi All,

This is my first post about SFDX as I planned with you, this is an introductory post as per my understanding, please feel free to contact if you have some correction / updates or any other scenarioes which you want me to cover.

Pre-Requisite is Get Started with Salesforce DX to install the Force.com CLI and related software and some knowledge of GitHub.

What is SFDX [Salesforce Developer Experience]?

A new experience for Developer / Coder to develop application faster and test in a separate organization or individual test environment same as in developer sandbox.

One of the most important changes with Salesforce DX is that, by externalizing more of the metadata and the org shape, we can shift the app’s “source of truth” from the Salesforce org to a version control system. This standard source-driven development approach has been used by developers for years, and it’s now a core part of the Salesforce developer experience.

Another key innovation for Salesforce DX is something we call the scratch org. The scratch org is a brand new org type built specifically for developers and automation. It’s ephemeral, built quickly from your source and metadata, and makes it easy to build your app consistently over and over again, which is great for team collaboration and test automation.

It’s worth noting that scratch orgs aren’t a replacement for sandboxes. Sandboxes are an important part of the larger development lifecycle, and work with our new source-driven development process as the destination for packages built directly from source. All sandbox types, from developer to full, offer the ability to act as user acceptance testing (UAT) and staging environments of the production org.

This following link of Salesforce Blog could get you more idea about SFDX:

 Salesforce Blog


This above article from Salesforce has a recorded session and article from Dreamfore 2016, which could be more helpful for you.

Salesforce has provided a powerful tool for learning and for getting started on SFDX, here is the source which will help you to setup and install your machine for SFDX:
Get Started with Salesforce DX

Dev Hub?
A Developer Hub (Dev Hub) provides you and your team with the ability to create and manage scratch orgs. Scratch orgs are temporary Salesforce environments where you do the bulk of your development work in this new source-driven development paradigm.

Scratch Orgs?Salesforce DX introduces a new type of Salesforce environment, the scratch org, a source-driven and disposable deployment of Salesforce code and metadata. Scratch orgs are fully configurable, allowing developers to emulate different editions with different features and preferences, playing a critical role in driving developer productivity and collaboration during the development process. They can also be used as part of automated testing and the implementation of a full continuous integration suite.

How to create Dev Hub Org?
To create a Dev Hub Environment, click hereFor App Development hands on with Salesforce DX, click here

How to manage Scratch Orgs?

We could do create and delete scratch org from Force.com CLI and from Dev-Hub we could manage scratch orgs as well. Here is the screen shot for Dev-Hub.

some commands for start up:

-> Create a Dev-Hub org first.
-> Authorize the devhub by web login flow:
sfdx force:auth:web:login -d -a DevHub

here -d defines that the org by which u will login is a devhub org. without -d that will be some sandbox or other org from which u will retrieve the project or so.

-> open you devhub organization:
sfdx force:org:open -u DevHub
-> view all orgs:
sfdx force:org:list
sfdx force:org:list —verbose

-> create a SFDX project on your local machine:
sfdx force:project:create -n geolocation

-> Go to the geolocation project folder
-> Create a scratch org:
sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch

Note: At the time of creating scratch org to test your project, there should be many things you should have in your mind. What about provisioned features, communities, applications, permissions, data and lot of things. I will try to cover that as much I can in my next posts.

-> Open the Scratch org:
sfdx force:org:open

-> view authentication information:
sfdx force:org:display --targetusername

-> set default user by using username:
sfdx force:config:set defaultusername=amitgoyal09@gmail.com
            OR
set default use by using alias:
sfdx force:config:set defaultusername=devorg

Useful References:
Force.com CLI

In next step, i will share some scenarios and important steps as discussed in my previous post.
Thanks for reading, stay connected.

Thanks.
Amit Goyal
Email: amitgoyal09@gmail.com
Skype: amitgoyal09

Friday, October 6, 2017

Knowledge Sharing for SFDX & GitHub [Version Control System]

Hello Friends, 

After a long time I am going to start blogging on SFDX and Github.
Please let me know if you need some other scenario to consider or any other topic which you like me to include.

What is SFDX, Dev Hub?
How to create Dev Hub Org?
What is Scratch Org and How to manage Scratch Orgs?
What could be do with scratch org and how could we create scratch org?

How could we start working on SFDX and helpful resources?
List of steps and commands for the following scenarios?

Pre-Requisites is Github Account and some knowledge of Github.

Retrieve Project from Salesforce, Convert in SFDX
How to enable provisioned feature for scratch org
What Is features and which is best source to get more information
Enabling Features for Scratch Org
How to manage getting permissions in scratch org and considerations
Implementation of first Consideration for permission-set
push to Github

Retrieve Project from Salesforce, Convert in SFDX
Enabling Features for Scratch Org
How to manage getting permissions in scratch org - second consideration
How to make changes in Scratch org
How to pull the changes in local project
How to acknowledge changes in local actual project and in scratch org
How to do Version Control
push on Github

Retrieve SFDX Project from VCS - Github
Create Scratch Org and Deploy project in SFDX
Manage permissions and Data in Scratch Org
How to work and manage project in Scratch org
Acknowledge changes
Pull changes in local project
push on Github

Problem which I am facing with SFDX.

Thanks.
Amit Goyal
Email: amitgoyal09@gmail.com

Skype: amitgoyal09