Lightning Flows in Salesforce: How to Call Auto Launched Flow from Process Builder in Salesforce ?

Under this topic, we will check:

  1. How we can create an auto launched flows in Salesforce.
  2. How to call an auto launched flow from process builders.
  3. How can we pass paramters from process builders to lightning flows.

Problem Statement:

When ‘Customer Priority’ field on Account is updated, update the ‘Priority’ field of all related cases having ‘Status’ as ‘New’ with same values.

Please check below video for detailed explaination along with examples and demo.

If you have any questions related to this topic, please add them in comments section of the video.

Advertisement

Lightning Flows in Salesforce: Using Formulas in Salesforce Lightning Flows

Under this topic, we will discuss, how we can use formulas in Lightnng Flows in Salesforce.

For using formulas, we need to create a resource of formula type and than use it in our flows.

If you want to know detailed explaination on how to create and use formulas in lightning flows, please check below video:

If you have any questions related to this topic, please add them in comments section of the video.

Lightning Flows in Salesforce: Record Choice Set in Lightning Flows

Under this topic, we discuss how we can use a record choice set to create an input field corresponding to Lookup fields in salesforce.

This is helpful when we have to use lookup fields in screen flows in salesforce.

While creating record choice set, you can even apply filter conditions to bring only specific lookup records , so that only those would be available for users to select. You can even sort records while fetching or configure those choice’s labels.

If you want to know the detailed explaination along with examples and demo for creating record choice set in Lightning Flows in Salesforce, please check below video:

If you have any questions related to this topic, please add them in comments section of the video.

Lightning Flows in Salesforce: Creating Picklist Choice Sets in Lightning Flows

To use picklist fields inside lightning flows,we need to have the picklist values available.

For this, we need to create a picklist choice set from resources section in flows.

Then, we can use those picklist choice set inside Screen Flows and map with picklist fields.

If you want to know the detailed explaination along with examples and demo for creating picklist choice set in Lightning Flows in Salesforce, please check below video:

If you have any questions related to this topic, please add them in comments section of the video.

Adding Lighting Flows to Record Pages

Under this topic we will see, how we can create variables and use them in lightning flows.

We will also see how to include our Lightning Flows inside records pages in Salesforce.

To incldue a flow on lightning record page of an object, we just have to edit the page with the help of lightning app builder and include flow in it.

We can pass the current record Id as parameter to Flow. We just have to create a variable in flow from resources section and make it available for input, then pass the value from record page itself.

If you want to look into detailed explaination with the help of example, Please check below video:

Let me know in the comments section of video, if you have any doubts related to this topic.

Creating First Flow with Screen Element and Debug a Flow

Under this topic we will look into:

Create a contact Records with the help of Screen flows

How to Debug a Flow.

Please check below video for detailed explaination on creating a Flow with Screen Element and how to debug a flow:

Let me know in the comment section of video, if you have any doubts.

Introduction in Lightning Flows in Salesforce

What is Flow Builder ?

Lightning Flow is the product inside salesforce to automate complex business processes.

Lightning Flow provides two tools Process Builder and Flow Builder.

Process Buidler is used to create processes.

Flow Buidler is used to create Flows.

When to use Flows?

If you want to automate a guided visual experience.

If you want to build more complex functionality as comapared to process buidler.

If your team does not have enough developers, flows could be alternative to write an apex code. Time and efforts to write a flow is much lesser than apex code.

Advantages of Flows

Flow builder provides a visual debugging interface whic makes troubleshooting smoother.

If you are delivering for a client team, flows are easier to maintain by providing an interface for admins to make changes easier in longer term.

If your team does not have enough developers, flows could be alternative to write an apex code. Time and efforts to write a flow is much lesser than apex code.

Flows interviews automatically bulkify the actions.

Flow Elements:

User Interface:

Screen Elements

Action

Subflows

Logic Elements:

Assignment

Decision

Loop

Pause

Data Elements:

Create Records

Update Records

Get Records

Delete Records

Resources in Flow Buidler

Variables

Constants

Formula

Text Template

Choice

Record Choice Sets

Picklist Choice sets

Stage

Lets look in to below video to actually go into flow builder and explore these things:

Let me know incase of any doubts or questions in comments section of video.

== vs === operators vs Object.is() in JavaScript

== Operator

•“==‘’ operator is used to compare two values.

•It does not check the data type of operands while comparisons.

•Rather it performs the type Coercion while comparing.

=== operator (strict equality )

•“===‘’ operator is also used to compare two values.

•It checks not only the values but also types of two variables.

•It does perform the type Coercion while comparing.

Object.is()

•Object.is() overcomes the limitations of “===” operator.

•Object.is(NaN, NaN) is true;

•Object.is(0, -0) is false;

•Rest all behavior is similar to that of strict equality operator.

Please check below video to look into detailed explaination with examples in == vs === vs Object.is() in JavaScrtipt:

Please let me know in comment section of video, if you have any questions related to this topic.

Type Conversion and Type Coercion in JavaScript

Type Conversion:

•Conversion using  built-in Functions by Developers

Example : String() , Number() and Boolean().

•String()

•Number()

•Boolean()

Type Coercion:

•The process of automatic or implicit conversion of values from one data type to another.

•Since JavaScript is a weakly-typed language, in some scenarios Conversions are done by compiler automatically.

     Example : 1== null

Rules :

•String on any side of operand returns converts into string before operation.

•No String on either side with all primitives, it converts into Number before operation.

•Array, Objects are considered as string before conversion.

Please check below video for more detailed explaination on type conversion and type coercion in JavaScript with the help of examples:

Please let me know in case you have any doubts in comments section of video.

JSON.Stringify() vs JSON.Parse() in JavaScript

JSON.Stringify()

•To convert JavaScript object to String.

•To convert array into String.

•It removes any functions from a JavaScript object, both the key and the value

•To avoid this, convert your functions into strings before running the JSON.stringify() function.

•Date Objects are converted into strings

Usage:

•When sending data to a web server, the data has to be a string.

•It is also used while Storing data in local storage of browsers.

JSON.Parse()

•To convert String to JavaScript object .

•JSON.parse() on a JSON derived from an array, will return a JavaScript array.

•When receiving data from a web server, the data is always a string. Parse the data with JSON.parse(), and the data becomes a JavaScript object.

•You should avoid using functions in JSON, the functions will lose their scope, and you would have to use eval() to convert them back into functions.

•Date objects are not allowed in JSON. If you need to include a date, write it as a string.

Please check below video for more detailed explaination with the help of examples:

Let me know in comments section of video, if you have any questions or doubts.