When Salesforce is life!

Tag: Salesforce Page 11 of 24

Salesforce DX Setup – Everything You need to Know

Let’s talk about a great new addition of the Spring’19 platform release to the
Salesforce Dev world, the Lightning Web Components framework, with our guest blogger Priscilla Sharon, Salesforce Business Solution Executive for DemandBlue.

DemandBlue is in the business of helping its customers maximize their Salesforce investment through predictable outcomes. As we thrive in an era of cloud-based Infrastructure, Platform and Software services, DemandBlue has pioneered “Service-as-a-Service” through a value-based On Demand Service model that drives bottom-line results. They foster innovation through “Continuous Engagement and On Demand Execution” that offers their customers Speed, Value and Success to achieve their current and future business objectives.


Salesforce DX Setup – Since inception, one of Salesforce’s core philosophies and the Big Idea has been to make building easy. Software should not be complex to install, set up, or customize. In fact, you shouldn’t have to even install software – it should be available to you at the click of a button – This declarative approach of Salesforce brought an end to complex and traditional methods of software development that even non-tech executives including business analysts and managers could slickly build line-of-business applications in a few clicks. However, while Salesforce was democratizing application development through clicks-not-code approach and ushering in the era of citizen programmer, there were other players who were strengthening their appeal to the traditional developer. With nuanced business requirements, modeling complex domains require more flexibility than clicks-not-code affords. Traditional methods of development weren’t dead after all.

As a result, Salesforce’s marketing and development efforts wanted to cater to the traditional developer with the introduction of Salesforce DX, a revolutionary product in the Salesforce App Cloud that allows users to develop and manage Salesforce apps throughout the entire platform in a more direct and efficient way. Used primarily by developers, Salesforce DX setup enables users to have true version control that allows them to have a better control over collaboration, auditing, disaster control and more.

Take a deeper dive into the comprehensive blog that gives you in-depth insights on how you can enable Salesforce DX environment and truly maximize its unique benefits.

Your 12 Step Salesforce DX Setup Guide

1.     Set up your project

Salesforce DX introduces a new project structure for your org’s metadata (code and configuration), your org templates, your sample data, and all your team’s tests. Store these items in a version control system (VCS) to bring consistency to your team’s development processes. Retrieve the contents of your team’s repository when you’re ready to develop a new feature.

2.     Salesforce DX Setup – Authorize the Developer Hub org for the project

During Salesforce DX setup, the Dev Hub org enables you to create, delete, and manage your Salesforce scratch orgs. After you set up your project on your local machine, you authorize with the Dev Hub org before you create a scratch org.

For this, you need to login to Dev/Sandbox Org from CLI

Run the force:auth:web:login CLI command on a directory where code for deploy to sfdx will be available.

sfdx force:auth:web:login –d

or

sfdx force:auth:web:login --setdefaultdevhubusername --setalias {ALIAS HERE}

NOTE: Login must be a valid login to your Dev/Sandbox Org and with Admin permissions.

3.     Configure your local project

The project configuration file sfdx-project.json indicates that the directory is a Salesforce DX setup project. The configuration file contains project information and facilitates the authentication of scratch orgs and the creation of second-generation packages. It also tells the Salesforce CLI where to put files when syncing between the project and scratch org.

4.     Configure your local project

After you create the scratch org definition file, you can easily spin up a scratch org and open it directly from the command line.

a)      Create the scratch org

  • Create a scratch org for development using a scratch org definition file. The scratch org definition defines the org edition, features, org preferences, and some other options.
  • Specify scratch org definition values on the command line using key=value pairs
  • Create a scratch org with an alias
  • Create a scratch org for user acceptance testing or to test installations of packages
  • Indicate that this scratch org is the default
  • Specify the scratch org’s duration, which indicates when the scratch org expires (in days)

b)      Open the org

  • To open the scratch org: sfdx force:org:open -u <username/alias>
  • To open the scratch org in Lightning Experience or open a Visualforce page, use the –path parameter: sfdx force:org:open –path lightning

c)       Set default user

Copy the username and enter the following command to set the defaultusername:

sfdx force:config:set defaultusername={SET THIS TO NEW SCRATCH ORG’S USERNAME FROM THE ABOVE  COMMAND}

d)      Display All Orgs

Run the following command to confirm the default Dev Hub [marked with (D)] and Active Scratch Org [marked with (U)]:

sfdx force:org:list --all

5.        Push the source from your project to the scratch org

To push changed source to your default scratch org:

sfdx force:source:push

To push changed source to a scratch org that’s not the default, you can indicate it by its username or alias:

sfdx force:source:push --targetusername [email protected]
sfdx force:source:push -u [email protected]
sfdx force:source:push -u MyGroovyScratchOrg

Selecting Files to Ignore During Push. It’s likely that you have some files that you don’t want to sync between the project and scratch org. You can have the push command ignore the files you indicate in .forceignore.

If Push Detects Warnings. If conflicts have been detected and you want to override them, here’s how you use the power of the force (overwrite) to push the source to a scratch org.

sfdx force:source:push –forceoverwrite

6. Salesforce DX Setup – Develop the app

a.       Create Source Files from the CLI

To add source files from the Salesforce CLI, make sure that you are working in an appropriate directory.

Execute one of these commands.

apex:class:create
apex:trigger:create
lightning:app:create
lightning:component:create
lightning:event:create
lightning:interface:create
lightning:test:create
visualforce:component:create
visualforce:page:create

b.       Edit Source Files

To edit a FlexiPage in your default browser—for example, to edit the Property_Record_Page source—execute this command.

sfdx force:source:open -f Property_Record_Page.flexipage-meta.xml

7.     Pull the source to keep your project and scratch org in sync

After you do an initial push, Salesforce DX tracks the changes between your local file system and your scratch org. If you change your scratch org, you usually want to pull those changes to your local project to keep both in sync.

During development, you change files locally in your file system and change the scratch org using the builders and editors that Salesforce supplies. Usually, these changes don’t cause a conflict and involve unique files.

By default, only changed source is synced back to your project.

To pull changed source from the scratch org to the project:

sfdx force:source:pull

To pull source to the project if a conflict has been detected (read more):

sfdx force:source:pull –forceoverwrite

8.     Salesforce DX Setup – Run tests

When you’re ready to test changes to your Salesforce app source code, you can run Apex tests from the Salesforce DX CLI. Apex tests are run in your scratch org.

You can also execute the CLI command for running Apex tests (force:apex:test:run) from within third-party continuous integration tools, such as Jenkins.

9.     Export The Package.xml

Export package.xml file into the temporary directory. Type the commands below in the root folder of your Salesforce DX project:

sfdx force:mdapi:retrieve -r ./temp -u {TARGETUSERNAME} -k  {SFDC PROJECT SOURCE LOCATION}\src\package.xml

10.       Convert Source code to Salesforce  DX

Convert the source code to the Salesforce Developer Experience project structure by running the following command:

sfdx force:mdapi:convert --rootdir temp --outputdir force-app

11.        Track Changes Between the Project and Scratch Org

To view the status of local or remote files:

sfdx force:source:status 

12. Salesforce DX Setup – Sync up

Sync the local version with the version deployed to Scratch Org for every change and test the changes on the Scratch Org by repeating the above steps. Once the testing is completed, we need to convert the source from Salesforce DX format to the Metadata API format. This is done by running the following command:

sfdx force:source:convert --outputdir {OUTPUT DIRECTORY HERE}

Copy the modified metadata files from this output location to the actual source location where the metadata files are downloaded from Dev/Sandbox Org to deploy the files to the server.

[Salesforce / Back To Basics] How to make a field required based on selected picklist value

For this new Back To Basics post, welcome Akashdeep Arora, Salesforce Evangelist/Consultant at HyTechPro. He started Salesforce journey in 2015. 3X Salesforce Certified Professional, 4X Trailhead Ranger, 5X Trailhead Academy Certified.Founder of #BeASalesforceChamp campaign.


Well, Astro turned 5 recently. So, what’s better than writing something related to Astro. As we all know, when you need a guide, Astro’s there for you.

#Astroturns5 #AppyBirthday #BeASalesforceChamp

Albeit, it sounds easy but still many Developers/Admins gets stuck when they want to make a field required based on one value selected from picklist field. Now, you must be thinking the way to achieve it.

We have different ways to make a field required:

  • Required Checkbox while field creation
  • Page Layout
  • Validation Rule
  • Using custom code (Visualforce Page, Lightning component, Apex Trigger to say a few)

But our scenario is little bit different as we want to make it required based on criteria, i.e. selected picklist value must be Astro.

Yay, let’s begin the fun without any delay.

The easiest way to achieve it is to use a validation rule. We have two fields:

  • Salesforce Character (a picklist field with values Appy, Astro, Codey, Cloudy and Einstein)
  • Astro Mom (a text field).

Here, we go.

After saving the rule, it will look like below:

Well, it’s time for testing. Testing is very necessary for anything. (Wink)

Let’s create a record without giving value in the Astro Mom text field and Select “Astro” from Salesforce Character picklist field like below:

As soon as you click on the Save button, it will give you an error “Please enter Astro Mom“.

Wohoooo, our validation rule is perfect it seems. Now, let’s provide the name of Astro Mom in the text field and click on Save button.

Hurrayyy, the record is saved this time. This is how you can make any field required based on selection of a picklist field value.

Don’t compare yourself with others.

You are best.

#Beasalesforcechamp

[Salesforce / LWC] Autocomplete magic with HTML Datalist

Ivano Guerini is a Salesforce Senior Developer at Webresults (Engineering Group) since 2015.
He started my career on Salesforce during his university studies and based his final thesis on it.
He’s passionate about technology and development, in his spare time he enjoys developing applications mainly on Node.js.


The <datalist> element is a new tag available in the HTML5.
This element can be used to create native autocomplete dropdowns without using complex JS and DOM manipulation for data filtering.

As you may have experienced, autocomplete picklist is a usefull component commonly used in forms to facilitate users in finding the correct value in case of very large lists of values.

In this article post, you’re going to learn how to use the datalist element to create a autocomplete dropdowns as Lightning Web Component.

For the TL;DR guys over there, this is the repo.

Let’s get started.

First let’s see how it works in an HTML page.

Simply write this code in an HTML page and we obtain a autocomplete dropdown like the below.

<input list="countries">

<datalist id="countries">
	<option>Italy</option>
	<option>Spain</option>
	<option>France</option>
	<option>USA</option>
	<option>England</option>
	<option>Belgium</option>
	<option>Brazil</option>
	<option>Mauritius</option>
	<option>Colombia</option>
	<option>Portugal</option>
	<option>Russia</option>
	<option>Mauritania</option>
</datalist>

Simple like that, all without any JS code.

Now let’s try to do the same in Salesforce.
Open your favorite IDE, and create a new LWC component, naming it ‘autocomplete’.

The html template we report the same code written above.

<template>
    <input id="input" name="input" list="countries" class="slds-input" type="text" />
    <datalist id="countries">
		<option>Italy</option>
		<option>Spain</option>
		<option>France</option>
		<option>USA</option>
		<option>England</option>
		<option>Belgium</option>
		<option>Brazil</option>
		<option>Mauritius</option>
		<option>Colombia</option>
		<option>Portugal</option>
		<option>Russia</option>
		<option>Mauritania</option>
	</datalist>
</template>

If we try to execute this component, we will see that it does not work as we would expect.
This is because the link between the input and the datalit is managed through the Id attribute. But as Salesforce reminds us:

The IDs that you define in HTML templates may be transformed into globally unique values when the template is rendered. If you use an ID selector in JavaScript, it won’t match the transformed ID.

To overcome this problem we can take advantage of a few lines of JS code, hooking up to the rerenderCallback.
Then in the Javascript controller we write the following function:

renderedCallback() {
     let listId = this.template.querySelector('datalist').id;
     this.template.querySelector("input").setAttribute("list", listId);
}

This code simply searches for our Datalist element and retrieves the ID generated by Salesforce, and consequently updates the input list attribute with the new Value.

Again the rendered callback can run a lot of times, but our code must be executed only once. To do it we can use a private attribute to know if the renderedCallback has been already executed:

initialized = false;

renderedCallback() {
        if (this.initialized) {
            return;
        }
        this.initialized = true;
        let listId = this.template.querySelector('datalist').id;
        this.template.querySelector("input").setAttribute("list", listId);
    }

Now our LWC component will work as autocomplete dropdown.

Let’s evolve it a bit, using dinamic options and decorating it with a label ad other attributes.

The HTML template will tranform like this:

<template>
    <label class="slds-form-element__label" for="input">
        <template if:true={required}>
            <abbr class="slds-required" title="required">* </abbr>
        </template>
        {label}
    </label>
    <div class="slds-form-element__control">
        <input id="input" name="input" list="valueList" placeholder={placeholder} required={required} class="slds-input" type="text"  />
        <datalist id="valueList" class="">
            <template for:each={values} for:item='item'>
                <option key={item.key} value={item.value}>{item.value}</option>
            </template>
        </datalist>
    </div>
</template>

In the JS controller we handle this values with @api decorator.

import { LightningElement, api } from 'lwc';

export default class Autocomplete extends LightningElement {
    @api values;
    @api label = '';
    @api name = '';
    @api required;
    @api placeholder = '';
    initialized = false;

    renderedCallback() {
        if (this.initialized) {
            return;
        }
        this.initialized = true;
        let listId = this.template.querySelector('datalist').id;
        this.template.querySelector("input").setAttribute("list", listId);
    }

}

Full repo here.

[ORGanizer] Giraffe release is live: few steps closer to release 1.0!

More then 3 months from the last Reindeer Release say hello to the ORGanizer for Salesforce Giraffe Release (0.6.8.4).

Why a Giraffe, you ask?

Like a Giraffe points its head up to the sky, the Giraffe Release points toward release 1.0, when we’ll finally go out of beta, closing an almost 3 years old path since its first release 0.1 in September 2016.

I’ve worked a lot on stability and bug fixing in these months, reviewing tens of issues and suggestions, provided by my beloved ORGanusers who support my day by day work.

A brand new sponsor

It’s also a pleasure to introduce you to our next sponsor NativeVideo for the next months, starting from the current release!

Founded in London in 2018, NativeVideo is on a mission to bring businesses and people closer together with the power of Video.

NativeVideo is the platform that, once installed from the AppExchange, enables video recording and browsing as a native functionality inside Salesforce.

The company has already released two “extension packages” that customise the solution to 2 specific use cases:

  • LeadGenVideo demand generation / deal nurturing thanks to video messages that include both classic webcam video recording and screen recording
  • TalentVideo designed for those companies that use Salesforce for their recruitment and adds video interviews to the process, with a very well designed workflow and collaboration features.

NativeVideo customers have customised the NativeVideo platform and the use of Video to their needs on other use cases, like Service – screen recording sent by the service representative to answer questions and solve bugs, CPQ – a walkthrough screen recording video where the offer is explained when it is sent to the customer, Customer feedback / testimonial – inviting customers to answer a few questions on video to provide feedback on the service and results they are receiving, and many more.

Jump to NativeVideo landing page to say hello and thank them for helping the ORGanizer to keep the hard work going!

What’s new with the Giraffe?

First we have new consolidated limits for logins storage:

Approaching to release 1.0 the number of logins that can be stored with the free edition of the ORGanizer will gradually decrease. The number of logins will be limited in the free edition but all the other features will always be kept free.

Pro version can be purchased from the Chrome Web Store and now using Promo Codes (only available on Chrome version as of now):

A promo code is strictly related to the user email address and has an expiration date, and conveys the same enhanced limits of the Pro version in-app purchase.

Why a promo code?

To allow companies to mass purchase ORGanizer licenses or for promotions or free trials.

New permissions required

The following permissions are now required:

  • Know your email address: needed to get your email address for Promo Code verification (your email address is never sent to anyone but only used to validate your codes, if any)
  • Read and change data on a number of websites:
    • force.com, salesforce.com, visualforce.com, documentforce.com, salesforce-communities.com: main Salesforce domains
    • organizer-api.enree.co: Promo Code verification endpoint. This endpoint is called only after Promo code validation (if any)

And more and more enhancements and bug fixes

Read the change log for the whole list of what’s inside this new release, and see you in the next release!

This blog has been verified by Rise: Rb4a7093bc3979124c781aae186805e25

[Salesforce / Lightning Web Components] Build Lightning fast Salesforce Apps

Let’s talk about a great new addition of the Spring’19 platform release to the
Salesforce Dev world, the Lightning Web Components framework, with our guest blogger Priscilla Sharon, Salesforce Business Solution Executive for DemandBlue.

DemandBlue is in the business of helping its customers maximize their Salesforce investment through predictable outcomes. As we thrive in an era of cloud-based Infrastructure, Platform and Software services, DemandBlue has pioneered “Service-as-a-Service” through a value-based On Demand Service model that drives bottom-line results. They foster innovation through “Continuous Engagement and On Demand Execution” that offers their customers Speed, Value and Success to achieve their current and future business objectives.


Salesforce launched Lightning Web Components as part of Spring ’19 pre-release to enable a quicker and easier way to program applications on the Salesforce Lightning platform. It engages modern Javascript innovations such as web components, custom elements, shadow DOM and more. Lightning Web Components is the Salesforce implementation of Lightweight frameworks built as per the web standards. It provides specialized salesforce services in addition to the core stack, such as Base Lightning Components, Lightning Data Service, User Interface API, etc.

Read on to discover how the Lightning Web Components fuses Web components programming model with Salesforce metadata and services to deliver unparalleled performance and productivity.

With Lightning Web Components, we are giving developers a standards-driven JavaScript model for building enterprise apps on Lightning. Every time we release a new platform capability we see an acceleration of innovation in our 150,000 customer base, and we are excited to see what our community of developers will do with Lightning Web Components.

Mike Rosenbaum, EVP of Product, Salesforce

Why Lightning Web Components

Lightning Web Components is like a newer version of Lightning Components with additional features.

  • Knowledge Domain – Developers who know Web Components are familiar with Salesforce Lightning Web Components out-of-the-box. Aura is proprietary, so the better you know the web standards, the better you’ll have of skills that can be used outside Salesforce.
  • Better Execution – Lightning Web Components leverages built-in browser security features from Web Components standards, which reduces the level of custom coding, which means they run faster and are more consistent in how they ensure security. Moreover, events have a limited scope, so there is lesser processing required handling events.
  • New Security Features – It gives better CSS isolation, DOM isolation, script isolation and limited event scope that facilitate a more consistent component design.
  • ES6+ – We have a better support for ES6 and ES7 that is not available in Aura. This enables you to do more with less coding. This also transpires code to work in IE 11 and other browsers which were not supported earlier.
  • More Consistent Data Binding – The not so user-friendly two-way data binding has been eliminated. This pushes developers to coordinate the way in which data moves between components. It also means that data binding will work as expected, without any unforeseen problems from Aura.
  • Mixins – You can even import accessible methods from other components and import specific Apex methods from multiple classes. Moreover, the Apex methods can be cached for improved performance.

What Lightning Web Components means for Developers and Customers

Cutting-Edge Advantages of Lightning Web Components

Boosted Performance – Developing Lightning Web Components does not involve complex abstractions to run on the browser, providing better performance to end users.

Ease of Use – Post development, the admins can deploy Lightning Web components with just clicks, not code to the applications.

Standardized – Salesforce Lightning Web Components is built on ES6+ that provides developers with modern and advanced JavaScript features.

How to create a Lightning Web Components framework?

LWC (Lightning Web Components) cannot be created directly from the developer console. You need to set up Salesforce DX to create a Lightning component. After the SFDX setup, you need to do a few more things:

  • Sign-up for development org
  • Get your Salesforce DX plugin updated with the latest release (Spring’19). Run the command below in your terminal or command prompt.
  • Command:
sfdx update  
  • Once you finish this process, follow the trailhead link to set up the basic project and create a basic Lightning Web Component

Transition from Aura Components to Lightning Web Components

Developers using Aura framework to build lightning components can continue to work on it as the Aura components will continue to function like before. However, the new components can be created using Aura or the Lightning Web Component framework. For future developments, it is best if you use the Lightning Web Components.

Lightning Web Components Availability

Lightning Web Components are available for users since February 2019 in Enterprise, Unlimited, Performance and Developer editions.

For more information, check out the official Salesforce page on Lightning Web Components.

[Salesforce / Apex] Handling constants on classes

Few days ago I was thinking about optimizing the use of constants (usually of String type) inside projects to avoid proliferation of public static final String declarations on various classes (with a limited control over duplicates) but giving at the same time developers a way to increase readability of constants in their code.

The reason for this post is that I want to know your opinion on this strategy, that on my eyes appear elegant and clear but may bring some drawbacks.

public class Constants{ 
	private static ObjectName_Constants objectNameConstants; 

	public static ObjectName_Constants ObjectName{  
		get { 
			if(objectNameConstants == null){ 
				objectNameConstants = new ObjectName_Constants(); 
			} 
			return objectNameConstants; 
		} 
	} 

	public class ObjectName_Constants{ 
		public String CustomField_AValue  { get { return 'aValue'; } } 
		public String RecordType_ADevName  { get { return 'aDevName'; } } 
	} 
} 

The class is basically shaped as follows:

This brings to a cool looking:

String myDevName = Constants.ObjectName.RecordType_ADevName;

This way we have the following pros:

  • Clear hirearchy for constants
  • More readable constants names (they are all getters but are used as constants, so no need for upper case)
  • Heap space is allocated on constants only if they are actually used
  • Centralized place for common constants

And these are the cons:

  • More quantity of Apex used to write a constants

I’m curious to get some feedbacks.

[Salesforce] Top 10 Spring ’19 Release Features

After the Winter ’19 Salesforce platform release post, our guest blogger Priscilla Sharon, Salesforce Business Solution Executive for DemandBlue, will introduce us with her 10 top Spring ’19 features.

DemandBlue is in the business of helping its customers maximize their Salesforce investment through predictable outcomes. As we thrive in an era of cloud-based Infrastructure, Platform and Software services, DemandBlue has pioneered “Service-as-a-Service” through a value-based On Demand Service model that drives bottom-line results. They foster innovation through “Continuous Engagement and On Demand Execution” that offers their customers Speed, Value and Success to achieve their current and future business objectives.

Their On Demand Services for Salesforce include Advisory, Development & Customization, Integration, Administration & Support, Maintenance, and Lightning Migrations.

The Salesforce Spring ’19 Release is here, and you’ll now be able to explore the exciting new features and upgrades of the newest release. Here is a quick overview of Salesforce Spring ‘19 release date, our most loved features in the Salesforce Spring ’19 Release, like the advanced Lightning Experience features, Deals Cadences, Flow Builder, Lightning Web components and much more.

For complete details on Salesforce Spring ‘19 Release date, click here.

Sell more with Sales Cadences

Sales Cadence is one of the most popular tools in the Salesforce Spring ’19 release for its high efficiency in offering some of the best practices to follow up with high-quality leads. This may include calling the lead, then to follow up with an email, then checking in with them five days later until they hit you up. The High-Velocity Sales feature enables you to create frictionless Cadences that allow sales reps to track what their next action ought to be.

Build Quicker, Simpler, and More Intuitive Flows with Flow Builder

Flow-building just got better with the all-new Flow Builder in Salesforce Spring ’19 release! The previous Cloud Flow Designer has now been replaced with the much faster and efficient Flow Builder. It is designed with four key design principles to enhance the Flow Building Experience – Clarity, Efficiency, Consistency and Beauty.  Its simplified User Interface streamlines the process of Flow Building that enables you to slickly choose the right resource for your flow. For instance, the data elements are consolidated, so you don’t need to keep track of whether you need to use Fast Create / Record Create or the type of variable that you need.

Here’s what you need to do to migrate from Cloud Flow Designer to Flow Builder: nothing!

The flows will continue to run as they did before. All flows created in the Cloud Flow Designer will seamlessly open in the brand-new Flow Builder. Whenever you make modifications and save a flow in Flow Builder, it is saved as the new version of the flow. And the original version is not overwritten.

Create Personalized Appointments with Lightning Scheduler

Deliver better customer experiences by setting up appointments with the right person at the right time. Take advantage of the Lightning Scheduler capabilities in Salesforce Spring ’19 release to schedule appointments within the Salesforce workflows like leads and referrals, opportunities and accounts. With a 360-view of appointments, you can better assign resources and more efficiently address customer concerns.

Here are some of the most critical functions you can perform using Lightning Scheduler in Salesforce Spring ’19 release:

  • Make records that represent the employees and additionally include details regarding their skills, locations, and accessibility.
  • Define office locations and working hours
  • Create appointment topics, like opening an account or mortgage application
  • Search for employees with appropriate skills for an appointment that includes certifications, areas of expertise among others.
  • Schedule client appointments, and include details about required attendees

Turn on Lightning Experience

Salesforce will turn on the Lightning Experience starting Winter ’20 to enable users to move faster and be more efficient. Everybody is encouraged to migrate to Lightning so that your end users can maximize benefits from everything the new interface brings to the table. The future of Salesforce experience is Lightning as all innovations will be happening in the Lightning Experience, going forward. It is best if you could take advantage of the lead time before the Lightning Experience is turned on to learn how your organization’s features perform in the new Lightning instance and to train your end users through Change Management. The Lightning Experience is reported to have increased productivity by a staggering 41% and conversion rates by 44%. To ensure better user experience when Lightning Experience is turned on later, get started now.

Download our comprehensive report on Lightning Migration here.

Get the Most Important List View with Pinned Lists

Do you have a preferred view that you want to make as a default list? This is now possible with the Pinned Lists feature in Salesforce Spring ’19 release that allows you to make a customized list of your new default. Click the Pin icon to pin an unpinned list and select the list view to pin a different list.

Organize Email Templates with Folders

This Lightning Experience feature in Salesforce Spring ’19 release enables sales reps and admins to easily group email templates into folders beyond just Private and Public folders. Users can now create folders in hierarchies and give permissions at different levels so they can locate the specific template they are searching for quicker.

Add Custom Resources to the Redesigned Lightning Experience Help Menu

The redesigned Help Menu in Salesforce Spring ’19 ensures that you have more room for your own resources. Now you can guide users when they work in your org with links to your website URLs, PDF files and Trailhead mixes. The getting-started section enables users and admins to get on-boarded to the new and updated user experience. Users can now search for and see documentation results from within the redesigned Help Menu.

New Lightning Web Components

Salesforce Spring ’19 presents a new kind of Lightning Component called the Lightning Web Component. And what used to be known as the Lightning Component is now named as Aura Component. Both Aura Components and Lightning Web Components work together as part of the Lightning Component framework. The Lightning Web component is a completely editable form developed with six lines of JavaScript.

Click here to read the official LWC guide.

Suggest Recommendations and Offers through Einstein Next Best Action

The Einstein Next best action feature in Salesforce Spring ’19 allows you to direct your users to the best next step. This component available on Lightning record pages uses various strategies that apply your organization’s business rules to display context-sensitive content like an upgrade or any other service. You get to define the rules and conditions that determine which recommendations to be displayed to your users. This feature is available as part of Einstein Next Best Action.

Here’s how it works. When a user accepts a suggestion, a screen flow launches. And to run a flow, your end users need to have either the Run Flow permission or Flow User field enabled on the user detail page.

Reports: Update headers, resize sections, stacked outlines and Conditional Formatting

Quickly Focus on Relevant Data with Conditional Formatting

Whether you are looking for the right approach to enable sales reps to effortlessly identify the hottest leads that need immediate action or quickly identify the accounts and opportunities valued in the range of $1,00,000 and $5,00,000, the Reports in Salesforce Spring ’19 features give you an all-in-one solution.  You can apply conditional formatting to the summary to add color to the reports and get actionable insights simultaneously.

Resize Column Widths to Fit Content

Say goodbye to truncated data and unused blank space! Salesforce Spring ’19 is updated with smart features that allow you to resize column widths in Lightning Experience in report builder and the run page.

Assemble Insights Faster with Stacked Summaries

You made complex but brilliant matrix reports so you could condense huge volumes of data and compare values across different fields. However, the condensed metrics that need to be compared aren’t always located alongside each other. You can enable the Stacked Summaries option to get a more viewer-friendly version that involves lesser scrolling.

What are your favorite Salesforce Spring ’19 Release features? Share with us in your comments section below. And to upgrade your Salesforce Org with latest features and updates, Talk to our team at DemandBlue, a one-of-a-kind Salesforce consulting partner delivering On Demand Services for Salesforce.Also, you can give us a call at 949-259-2381 or email us at [email protected]

[Salesforce] Read this before you perform your Salesforce Data Migration

Let’s talk about Data Migration in Salesforce with Priscilla Sharon, Salesforce Business Solution Executive for DemandBlue.

DemandBlue is in the business of helping its customers maximise their Salesforce investment through predictable outcomes. As we thrive in an era of cloud-based Infrastructure, Platform and Software services, DemandBlue has pioneered “Service-as-a-Service” through a value-based On Demand Service model that drives bottom-line results. They foster innovation through “Continuous Engagement and On Demand Execution” that offers their customers Speed, Value and Success to achieve their current and future business objectives.

Their On Demand Services for Salesforce include Advisory, Development & Customization, Integration, Administration & Support, Maintenance, and Lightning Migrations.


Salesforce Data Migration – Imagine if you were traveling to an exotic new destination for the holidays. You want to make sure that everything is perfect and that nothing goes wrong. You might want to take all the precautionary measures – get travel insurance, have emergency info at hand and make sure that you pack all the necessary things without leaving anything behind. You know there could be nothing worse than reaching the airport only to realise that you forgot your passport – Sigh! But you also know that you don’t have to go through these hassles with careful planning and preparation, which can make it a safe and wholesome vacation for you.

Just like traveling from one place to another, migrating data from one place to another be it from Excel Spreadsheets or Legacy systems to cloud, needs utmost care and caution throughout the scope of migration in order to avoid any mishaps. And ensuring practical safety tips might just save you from the glitches in your Data Migration plans. So, here’s a quick 6-point checklist – your passport to a safe and successful Salesforce Data Migration journey.

6-point Checklist for Successful Salesforce Data Migration

  1. Engage the Stakeholders: It is critical that you involve your stakeholders and inform them well in advance before migration to ensure that you gain maximum support for the project. Stakeholders from different teams and departments have profuse knowledge of the data and can give actionable insights pertaining to your Salesforce Data Migration plan.
  2. Identify the Data to be Migrated: Stakeholders are aware of the most crucial data and clarify your uncertainties regarding the data structure, the place of storage, if it has any duplications and its effect on the Salesforce Data. It might require you to create new or appending current data fields, validations and field values in Salesforce.
  3. Create a Backup – Most importantly, create a data backup to perform a rollback to recover from any possible errors. With a Data Backup, you can be double sure that you can go ahead with the migration process, so if at any stage there is an issue, you know you have the original data to fall back on.
  4. Prepare Data for Error-free Data Migration: After deciding on the changes to be done in step 2, now you can make the necessary adjustments to ensure error-free Salesforce Data Migration process. You can add or modify objects, fields, workflows and validations.
  5. Run a Test Migration: You don’t want to back out after importing all the data into the system. So, to avoid risking data in production, it is highly recommended that you run the test in a Sandbox environment to fix possible issues.
  6. Migrate Data: The test Migration gives you the confidence to migrate data into the production environment. Inform your stakeholders about the changes and how it will affect them prior to migration. Post your Salesforce Data Migration process, it is crucial that you validate the data.

How to Prepare for Salesforce Data Migration?

Each and every Salesforce Data Migration project is unique. Therefore, different migration may need different tools and resources. Having said that, here are top considerations to incorporate in any Salesforce Data Migration strategy.

  1. Identify the Team Members to be involved: Besides the stakeholders, you need to consider the admins and developers who need to be involved in the Salesforce Data Migration process. You will need to include the end-users who will work with the data.
  2. Start Early to Start Early: A Salesforce Data Migration plan is typically a part of a larger project. So, an early start would mean the early start of the big project you have planned. You need to identify, prepare, clean, restructure and map data well ahead of time.
  3. Build an adequate amount of time into the Schedule: Salesforce Data migration instances will have many exceptions, and you need to be prepared to meet them. Unexpected issues may surface when you practically work with the data. People may skip steps to meet the deadlines if your schedule is unrealistic. You need to remember that getting it right is as important as getting the work done on time.
  4. Designate tasks to the right People: You need to avoid assigning too many of the members on a task or inviting too many people into a discussion. Ensure that you assign each person’s role after you identify the people to be involved.
  5. Identify the Right Tools: Salesforce has quite a number of tools for Data Migration. In certain scenarios, an organization may require tweaks to be made to an existing tool or to develop a new one.

Enjoy this great infographic!

Have a safe journey with DemandBlue…

Salesforce data migration involves critical decisions since it is typically a small part of a bigger project. Though data migration may be a subset of a larger project, it’s no small task, and the end result can make or break the success of the bigger project. Hence, Salesforce offers cutting-edge data migration tools, such as Data Loader, Data Import Wizard along with Third-party apps that help automate Salesforce Data migration. However complex projects may require an experienced Salesforce Data Migration Consultant who has existing tools or can develop them based on an organization’s specific requirements. And we at DemandBlue have been a preferred Salesforce partner for our one-of-a-kind On Demand Solution for Salesforce. On Demand is a unique Service-as-a-Service model where businesses can deploy Salesforce projects without the hassles of costly contracts or complex SOWs; our clients are charged only for the number of hours spent on a project – be it 40 hours of effort spread over a week or two or a 100 hours of effort spread over a period of a month or two, the customer is billed only for what is consumed.

To find out how On Demand Service model for Salesforce can add Value to your next Salesforce project, Talk to DemandBlue team now!

[Salesforce / Interview Tips] Preparing for a job interview as a Salesforce Administrator

 
Becoming a Salesforce Administrator is often the entry route into the world’s number one CRM technology, but this doesn’t make the job interview process any easier for prospective admins.

As the most prominent role in Salesforce, the competition for a job as a Salesforce Administrator is particularly high. In Mason Frank’s 2018/19 independent Salesforce salary survey, 70% of respondents reported being a Certified Salesforce Administrator, far higher than any other certification. With other candidates waiting in the wings, you need to be sure your interview goes perfectly to guarantee the job offer, and that comes down to preparation.

A job interview for a Salesforce Administrator role can take many forms, and so you’ll need to be prepared for several different lines of questioning. Your interviewer won’t just be interested in your technical experience as an administrator, they’ll also want to know how you see CRM as part of a larger business, and use this to test how much you’ve researched their organisation. In addition, they’ll also want to get to know you as a person.

Read on for a series of tips on how to prepare for your next job interview as a Salesforce Administrator.

Testing your technical knowledge

Ultimately your prospective employer will want to learn how skilled you are on the Salesforce platform, and so you should expect to be asked technical interview questions. A Salesforce Administrator is quite a varied role, and so technical questions you may be asked can be quite broad. You could be asked something very functional such as ‘what is a roll-up summary field’, or perhaps something a little more scenario-based, such as ‘how do you share a record and in what circumstances would that be expected?

One thing that you need to be aware of going into the job interview is that your interviewer may have no experience using Salesforce, or alternatively they may be a Certified Technical Architect.

With this in mind, it’s not enough to simply have a good working knowledge of Salesforce, you need to be prepared to explain technical concepts in plain language so that a non-expert will understand you. Having technical knowledge is one thing, but being able to communicate your knowledge to a layman is another thing entirely, so practice this before the interview.

Testing your experience

While knowledge is valuable, application is power.

Salesforce Trailhead is a fantastic education portal and is responsible for launching the career of thousands of Salesforce professionals, but it won’t provide you with that all-important practical experience that employers are looking for. This is why experience is incredibly valuable, and so you should be prepared to discuss the projects you’ve worked on and what you learned from them.

If you’ve worked as part of an implementation team, be ready to discuss the technical elements as well as the challenges you faced and how you overcame them. If you’ve ever experienced data loss or a data breach, be ready to discuss how you discovered the event and how it was resolved. Don’t be afraid to discuss challenges and mistakes made—this is what experience is all about, and will set you apart from the other candidates.

Something else that employers value highly is your ability to work on a collaborative project. As an Admin it’s unlikely that you will be working completely independently, so be prepared to talk about your communication skills, requirements gathering, and ability to work within the confines of a project timeline, using examples from your previous experience.

Testing your cultural fit

It’s essential you have the skills and experience to perform the job you’re being interviewed for, but your prospective employer will also want to get an idea of who you are as a person. After all, they’ll likely be spending around 40 hours a week in your presence, so it’s important they employ someone who they’ll enjoy working with—you should also be confident that you’ll enjoy working with them as well!

Given that your technical knowledge and experience come with the territory of being a Salesforce professional, getting your personal character across can often be the most nerve-racking element of a job interview, but this shouldn’t be the case. Just be yourself and communicate your goals and ambitions clearly.

It’s always a good idea to think about why you entered Salesforce technology and where you eventually want your career to take you, as long as you can relate this to why you want the job you’re interviewing for and how this will help you achieve your goals.

Being a successful Salesforce Administrator is about more than just doing the job, it’s about finding ways to maximise the value of Salesforce in an organisation, and making yourself indispensable as a result.

[Salesforce] How to safely get the logged in community user from Einstein Bot

 
Few weeks ago I blogged about Dealing with the running User on Einstein Bot dialogs.

One of the questions I got from the community was:

is this approach safe for production?

I was actually not sure about this, as the logged in info was passed from the pre-chat page to the chat bot context in clear: this way an advanced JS hacker could have impersonated a real user, knowing its username/user id: that’s why I replied that you should have used a temporary “token”, that should have been deleted once used (upon user confirmation on the Chat Bot loading step).

When I write posts about tech workaround all I have in mind is open your minds and make you find a new way to solve problem: from this point we can enhance our solution to make it the best one!

Few days ago Arthur Imirzian contacted me to read his new article on his blog: How to safely get the logged in community user from Einstein Bot.

This blog was the direct consequence of my workaround, making the user identification safer.
He then went on by finding another workaround to enforce user authentication with this great post!

I loved his quick and dirty style and I decided, upon his approval, to repost his article here.

Enjoy the reading!


Kerckhoffs’s principle says that a cryptosystem should be secure even if everything about the system, except the key, is public knowledge. The user id is not a key and shouldn’t be considered as one.

Both classic Live Agent client and Snap-Ins chat client provide a very useful feature to pass the prechat information to the custom fields on LiveChatTranscript object.

As you know, Einstein bot is built on top of Live Agent and allows you to trigger apex actions based on community user message like a knowledge article search. Problems come when you want to make authenticated actions like updating your case status or contact information. Live Agent doesn’t provide any way to enforce logged community user session. Instead, the context user is a technical user (AutomatedProcess or Integration).

The first reflex is to get the user id from a visualforce page / lightning component and pass it to the Snap-Ins Code Snippet in order to reuse it from apex by querying the Transcript Object. This approach is a security breach as the user id can be easily changed on the fly. The attacker can usurp any user by providing another user id. Again, user id is not a private key and shouldn’t be used as one.

A safer approach

So we need to find a way to validate that the returned user id is equal to the connected user id. The idea illustrated below suggest asymmetrically hashing the user id so no one can change it to usurp someone else’s identity. As the end user cannot produce a token, it can’t corrupt the user id.

Step 1: Token generation

The first step is about token generation based on connected user id. The user id will be publicly accessible but we will use a self-signed certificate to sign the user id and generate a token.

Go to Setup > Security > Certificate and Key Management > Create Self-Signed Certificate, define a label, a unique name, uncheck Exportable Private Key and click on save.

Use the apex code below to generate a secure token based on session id and user id of the connected user.

public static String getToken(String keyToSign){
    if(keyToSign == null){
        return null;
    }
    return EncodingUtil.base64Encode(
        Crypto.signWithCertificate(
            'RSA-SHA256',
            Blob.valueOf(keyToSign),
            'LightningComponent'
        )
    );
}

Step 2: Get the user id and the token

Add the lightning:prechatUI interface to a Lightning component to enable Snap-ins to identify it as a custom Lightning page template that can be used for the Snap-ins Chat pre-chat page (docs here).

Now call the getPrechatData method from your lightning component to retrieve the logged user id and its token.

@AuraEnabled
public static Map<String,String> getPrechatData() {
    Map<String,String> prechatData = new Map<String,String>();
    // Returns the context user's ID
    String userId = UserInfo.getUserId();
    prechatData.put('userId',userId);
    String token = getToken(userId);
    prechatData.put('token',token);
    return prechatData;
}

Step 3: Pass the prechat information

LiveChatTranscript is the unique object that can be used to share context between the logged user and Eintein Bot which means that we need to create custom fields on LiveChatTranscript object.

Go to Setup > Object Manager and search for the Live Chat Transcript object. Then Field & Relationships to create two new custom fields called UserId (UserId__c) and Token (Token__c).

Now we have retrieved the user id and the token from step 2, we can pass them through a snippet setting file.

Add the code below to your existing Snippet Settings File you had uploaded as a static resource.

embedded_svc.snippetSettingsFile.extraPrechatInfo = [
    {
        "label":"UserId",
        "transcriptFields":[ "UserId__c" ],
        "displayToAgent": false
    },
    {
        "label":"Token",
        "transcriptFields":[ "Token__c" ],
        "displayToAgent": false
    }
];

Don’t hesitate to visit Nerd At Work’s blog for more details.

Step 4: Validate the token and trust the user id

This is the last step before we can rely on the returned user id. We need to ensure that nothing has been corrupted. We’re going to sign the user id returned by the lightning component again and compare this new token to the returned token.

public static Boolean validateToken(String userId, String token){
    return token == getToken(userId);
}

If the user id was corrupted by the end user, signing it again will produce a different token than the previous one. If not, it means we can now rely on it.

Conclusion

We just described how to safely get the connected community user id from a live agent session. And remember you should never trust user input, your user will not always submit data your application will expect.

What’s the next step ? First pass the Einstein Bots Basics module and then jump to the second article about authenticated DML operation from Einstein BOT.

Page 11 of 24

Powered by WordPress & Theme by Anders Norén