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:
Download JQuery and save it as a static resource by name “JQuery”.
Copy below Visualforce page
Replace “flow:interview” name by your flow name
If you are expecting any URL parameter then simply add it as “apex:param” as shown in code
Add your field names which does not need to be mandatory in variable “nonMandatory”
In your Flow, add “– None –” as first choice in dropdown
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 →
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.
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.
Objects are objects, even if they are standard or custom objects. Salesforce simplified navigation to access Objects, we can access it now from “Object Manager” menu in setup.
2. Lightning App builder to edit record page layout (pilot)
“Lightning App builder” should be enabled first to use this feature. We can use lightning components developed in Org or from AppExchange and change new lightning layout by using intuitive, drag and drop page layout editor.
Lightning App builder – Record page edit
3. Rollup Summary field limit increased from 10 to 25
4. Restricted Picklist (Pilot)
Using Apex , Dataloader or any other API , it is possible to save any other value than allowed value in picklist field. This future will enforce data integrity and result in error if other than allowed value selected in DML operation.
I am sure lots of visitors reading this post commutes to office almost daily either by own car or public transport. I use my leisure by listening Salesforce podcasts mostly. There are many Salesforce podcast maintained by awesome admins and developers globally. They dedicates lots of effort and time around planning every episode, try not to be biased, putting thoughts in funny and practical way, discussing about latest problems and solutions on Salesforce ecosystem, inviting special guests. Every day after listening new podcast from these channels, I get push and motivated to do more, contribute more and gain more knowledge.
At least I can do by this post is to introduce all fantastic available podcast and their host, who are taking so much effort to bring voices, news and thoughts all around in our loving Salesforce community.
So, below are list of all my favorite Salesforce podcasts :
Few months back I bought a new high end laptop with i7 processor and 16GB of RAM. Decided to give a shot to “SSD hard disc” over conventional hard disc. Performance of my system is incredibly fast, I have SQL Server, Jenkins, Command line Dataloader jobs, Apex static code analyzer all running almost at same time. Windows OS boots up in almost 2-3 seconds only, as compared to 15-25 sec previously. However because of decision of “SSD Drive” I had to compromise storage capacity. My “C” drive is only around 150 GB however D drive has lot of space. After analyzing many folders, I found that google chrome browser creates its temporary folder in “C” drive even though I have installed it explicitly in “D” drive. I wanted to move “Appdata” folder of google chrome to “D” drive to make sure I have enough space in “c” drive.
I came across “Symbolic link” concept in operating System. In “Symbolic link” folder points to other location and its very useful technique to solve problem of storage. We can create symbolic link of many folder from “c” drive to any other location where we have good enough space. Continue reading →
Sending email from Apex looks very interesting and powerful feature at first glance however by time your application evolves to more complex structure or more data, chances are very high that you will be hitting many Apex email limit related errors. As Salesforce is not mass email sending tool, it makes sense to have limits on total number of outgoing emails per 24 hours.
At a time of writing this post, mainly there would be two types of error while sending email from Apex as explained below
Transaction based errors
We can send 100 emails per SingleEmailMessage
Per day (24 hour) email limit
We can send 1000 emails per day
One point to note here that we can send unlimited emails to internal users including community users. More details on email limits can be found here (Salesforce governor limits)
I have seen multiple questions on Salesforce developer community on how to resolve error related to sending email per 24 hour in Apex. Below solution has been used by me for a long time and it is working to send thousands of email per day without any problem.
Let’s see how we can resolve this error with below design.
Resolve 24 hour Apex email limit error in Salesforce
This blog post explains how to get information about earthquake locations on Google map with magnitude and date. If you want to learn how Angular works, how integration using REST API works, then this example will guide you in right direction.
City Search box – You can search any location on planet. Google API is used to locate this location in Map component. If more than one location found then internally it automatically displays first location.
Google Map – This component displays location in Map. Earthquake locations are displayed as bubble. Earthquake magnitude and time is displayed on tool-tip. You need to get your API key so that Google Map will work with your code. In this demo, you will find my API key however I would suggest not to use it as it may run under limit usage
Largest Earthquake in 12 months – This application uses geonames.org website. It hosts publicly consumable web services. One of the important part of API is that it needs four direction bounds and Google Maps API is one of right candidate which provides these values and can be used with geonames API. You can see how Google and geonames both works together in below example.
We are not using any Apex controller because Ajax library from AngularJs is used to call webservice and JSON is extracted and displayed on UI by using Angular.
Do not forget to add Google and geonames URL in remote site settings so that Salesforce should be able to communicate with these external websites.
I have used Bootstrap as well to make user interface more intuitive
Using Live agent, Service representatives can directly chat with customers and resolve customer issue. Chat support is noways preferable way to contact service representative. No need to stay on call for hours, no need to wait for email reply for days. Even I use chat support wherever it is possible as its very easy to use and multi tasking can be easily done by opening chat in one window and continuing work in other windows. Live Agent is native tool provided by Salesforce which can be setup by point and clicks and no need of programming is needed. If you want Video tutorial on how to setup Live agent, you can skip this post and navigate here.
LiveAgent in Community Demo
1. Creating Skills
Setting up Live agent is very easy if you know how Service cloud or Call center works. If we take example of day to day life, when we try to chat someone, it asks us to choose from area to contact like “Billing Issue”, “Sales Issue”, “Product repair” etc. Options makes it very clear that chat will be routed to different team on basis of area. Same way, while setting up Live agent in Salesforce, We need to create different team with different skills. In our case, I am going to create Skill named “EDI Skill Group”. To create skill, navigate to “Build | Live Agent | Skills | New”. Continue reading →