Salesforce Sandbox Breakdown

 Best Practices in terms of team setup

Develop in Isolation

  • DO NOT use production
  • If you share a dev org, try to do it on a per object or per work item basis
  • If possible - don't share dev orgs!


  • Synchronize with peers to not only leverage each others work but as a way to do peer review
  • Find stable checkpoints or phase gates to handoff between functions (ex: QA)

When to Integrate

  • Integrate when complete
  • Integrate with peers when development and unit test coverage is complete
  • Itegrate with the current production setup for testing and sign off

Salesforce APIs and What They Are For...


What can you use it for


Access the different objects in your org using standard REST protocols


Integrate your org’s data with other applications

Bulk API

Insert, delete and perform Async queries against large data sets

Metadata API

Build tools that manage your metadata model and make customizations in your org

Streaming API

Send/Receive secure notifications. These notifications can reflect data changes in your org or even custom events

Tooling API

Build custom development tools for different Salesforce Platform applications

Chatter REST API

Build a UI for Chatter, Files, Topics, Communities and more

Marketing Cloud API

Get comprehensive access to most email functionality with the SOAP API.

Mobile SDK

Integrate native or hybrid mobile apps directly with Salesforce


Salesforce DX - Scratch Orgs vs Sandboxes

Most of us on the Salesforce platform are well aware of Sandboxes but I'm starting to get more and more questions on "Scratch Orgs". More specifically, what is the difference between a Sandbox and a Scratch Org and when to use one over the other. 

Let's start with a simple statement - Scratch Orgs are NOT meant to replace Sandboxes but rather be used in conjunction with.

The scratch org is a source-driven and disposable deployment of Salesforce code and metadata. Scratch Orgs are driven by source, Sandboxes are copies of production.

Scratch orgs do not replace sandboxes. Scratch orgs are not permanent and they don't include any production data. 

Scratch orgs complement Sandboxes. They are great for temporary deployments. We typically use them for peer review and a way to get enhanced test coverage and automation.

Sandboxes are still critical for staging, performance testing, licensing etc.


  • You can have up to 25 active scratch orgs
  • They automatically get deleted after 7 days
  • You can create up to 50/day per Dev Hub

Key Benefits

  • Increased Developer productivity
  • Better and easier Team Collaboration
  • DevOps Automation (my favorite)



Salesforce Sharing Model Visualized


Salesforce Security Model

Sometimes it helps to have a picture to put with what you are reading. Below is a handy little diagram that outlines the FLS (Field Level Security), Sharing and CRUD that makeup the Salesforce security model.

CRUD - Create, read, update, delete. Which objects the user can see in Salesforce.

Field Level Security (FLS) - which fields on a record can the see or edit

Sharing Rules - which specific records are visible to the users.


SOSL WITH HIGHLIGHTING (part of Spring '17)

I'm super excited about this update being released as part of Salesforce Spring '17 (works in both SOAP/REST API 39). I've been testing it out in my sandbox. Below is a simple example of the syntax:

FIND {salesforce} IN ALL FIELDS RETURNING Lead (Company, Description) WITH HIGHLIGHT

This functionality works on the following fields types (as of right now):


  • Email
  • Text
  • Text Area
  • Text Area (Long)


You can run this simple example in the Developer console and see that it returns the results with the <mark> tag around the term.

With this functionality, it is now pretty easy to search through a lot of record data for very specific things and return back a nice highlighted list of the results without having to use or build some form of custom control.




Lightning Inspector Updates

The latest release of the Salesforce Lightning Inspector came out on December 28th, 2016. I'm excited about this one. I use this to physically see every Lightning page and component that make up a Lightning app. This is crucial from a debugging standpoint as well as performance tuning.

You can drill in for example and see all the initiated actions and results. With this latest version you can see information about Lightning components on ANY page that lightning is detected. Previosuly we were a bit more limited in that the Lightning Inspector only ran on pages with a particular URL pattern.


Download/Install from the Chrome Store. 

After you install in Chrome and hit F12 to load a new "Lightning" tab in the dev tools. In a simple example below you can see for example how many total components were loaded.


Change Default Record Type on Salesforce Create

I was working with an organization the other day where I helped them installed and setup the Salesforce Non-Profit Starter pack. This autmatically creates record types for the Organization and Househould. One of the users came back (the person I was training as an admin) and asked if we could change the default record type. This is a fairly simple process so I thought I would show it below.


Setting the default record type is done at the profile level. Navigate to the following:

Setup > Manage Users > Profiles > (Select a profile like Standard User) > Object Settings > Accounts

Here is a sample of what you might see

In our case I changed to Household account as the default. The nice thing about having it at the User Profile > Object level is you can set it to different things based on the type of user. In this organizations case they have different users that create partner organizations than those who enter household accounts. It's easy to default to different record types for each of those users in this fashion.

Now when a new Organization (Account) is created it defaults to Household Account for the Standard User profile we just modified.



Asynchronous Apex on Trailhead

This is one of the best charts or cheatsheets I've seen to show scenarios in which to use