Salesforce Spring 17 release – My favorite features

List of my favorite features in Salesforce Spring 17

In this post, I would be only talking about Generally available (GA) features, excluding pilots and Beta. Saving those awesome features for suitable time to come. So, here are some of my favorite picks from Spring 17.

Composite Resource

Imagine we are doing REST API call from external system by creating Account first and then contact. In between if internet connection is gone or user closes browser and only Account created without contact ?  From Spring 17, we can reduce number of REST API calls made by combining them in single request. Advantage of this feature would be easier transaction management and API limit saving. You can have up to 25 subrequests in a single call. Up to 10 of these subrequests can be query operations, including Query, QueryAll, and “Query More” requests to obtain the next batch of query results. Continue reading “Salesforce Spring 17 release – My favorite features”

Salesforce Flow Interview Questions for admins – Part 23

Consider it interview questions or FAQs, However below are some high level information or gotchas related to Salesforce Flow.

220+ Salesforce Interview Questions
220+ Salesforce Interview Questions

121. How to create lookup field in Salesforce flow?
Ans : There is no direct way to create a lookup field in flow but we can use workaround mentioned in this post.

122 : How to handle fault in Salesforce flow?
Ans :
We can send emails or fault screen can be created. If any element is connected to second screen, it automatically becomes fault screen and we can use “$Flow.FaultMessage” on screen to show error message. output text can be added on screen with message something like “Sorry, an error occurred in the page. For help, provide your administrator with the following information: {!$Flow.FaultMessage}”. Read more here.

123 : How to redirect Salesforce flow after completion, if end URL is known in advance?
Ans :

There are two approach :

First by using “retURL” parameter in URL of flow

and second,  if flow is used in Visualforce page then

    <flow:interview name="MyUniqueFlow" finishLocation="{!$Page.MyUniquePage}"/>
    <flow:interview name="MyUniqueFlow" finishLocation="{!URLFOR('/home/home.jsp')}"/>

124 : What are difference between lookup and fast lookup data elements in flow?
Ans :
Lookup record will return only first matching record however to get all matching record, we should use fast lookup. Any data element with prefix “fast” means to work in bulk. As shown in below image we have two flavors of Data element in flow for CRUD operation. Continue reading “Salesforce Flow Interview Questions for admins – Part 23”

Non mandatory dropdown field in Flow

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with 2 Comments on Non mandatory dropdown field in Flow

Creating Non Mandatory dropdown field in Salesforce flow

I have been working on Salesforce flow for a time now and faced many challenges. I always had an option to use Visualforce page however Flow is fun and powerful. In previous article , I have explained how we can create two column layout in flow, which was very easy to use.

Recently, I came to know that we cannot create none required dropdown field in Flow. So please vote this idea so that we will not need this workaround.

Making none mandatory dropdown field is very easy and you don’t need to know any coding, just follow below simple steps:

  1. Download JQuery and save it as a static resource by name “JQuery”.
  2. Copy below Visualforce page
  3. Replace “flow:interview” name by your flow name
  4. If you are expecting any URL parameter then simply add it as “apex:param” as shown in code
  5. Add your field names which does not need to be mandatory in variable “nonMandatory”
  6. In your Flow, add “– None –” as first choice in dropdown

Lets repeat above steps in detail with an example. Continue reading “Non mandatory dropdown field in Flow”

Creating two column layout in Flow

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with 17 Comments on Creating two column layout in Flow

Simple utility to convert One column to Two column layout in Salesforce Flow

Salesforce Two column layout in Flow
Salesforce Two column layout in Flow

Salesforce flow does not support two column page layout in flow, please vote this idea if you want it as out of box functionality.

However, using below solution we can convert single column page layout to double column layout in flow.

We need to embed flow in below Visualforce. Not necessarily you need to have a knowledge of Visualforce code, simply copy paste in your Salesforce organization and replace flow name with your flow name in your organization. This Visualforce page uses JQuery library to manipulate DOM element. Please download latest version of JQuery and save it as static resource with name “JQuery2_1_4” or you can also update static resource name in below code. Continue reading “Creating two column layout in Flow”

Flow in Salesforce – Youtube Video tutorial

Short video tutorials to understand basics of Salesforce flow and how to get most of it

1. Basics of Flow in 15 minutes

This video tutorial explains declaring variables in flow, best practices while declaring variable, reading URL parameter and storing it in flow variable, creating custom button to launch flow from page layout, updating record, proper handling of fault messages and displaying it to end users.

Continue reading “Flow in Salesforce – Youtube Video tutorial”

Creating Lookup field in Flow

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with 5 Comments on Creating Lookup field in Flow

How to create alternative solution for Lookup fields in Salesforce flow

Flow is pretty powerful tool not only for admins but for developers as well. As a best practice, we should not code until and unless there is no “better” point and click option available. If you have to solve one problem using 20+ workflow rule and it could be solved in just 10-20 lines of code then off-course in those scenario it makes sense to use code over point and click.

You can consider visual flow equivalent to Visualforce for admin. We can create very powerful wizard like functionality without any code. Once flow is implemented, we can use it in Custom button, Visualforce page, chatter actions etc…

I was in situation where I needed to create a lookup field, however lookup field element is not available in Flow. Lets consider we want to search Lead record just like lookup window functionality and display matching result to end users. As lookup field is not available, we will provide list of options to end user using “Dynamic Record Choice” and once user select record we will make selected record available on next screen.

Continue reading “Creating Lookup field in Flow”