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”

Circular Progress Bar with Conditional Theme – Salesforce Lightning Component

Salesforce Lightning Component – Circular Progress Bar with Conditional Theme. Ready to be used by Developers and Admins on App builder for any object. No External Javascript Library, Lightweight CSS based.

Just after two days of writing Circular Progress Bar , came up with few more requirements. So, In this post, will share updated code of Circular Progress Bar. This component can be easily used from Lightning App Builder, check this video to get an idea on how it can be used and configured.

In additional to all previous capabilities, below features are added:

  1. Conditional Theme – Let’s say before 50% progress bar should be displayed as red and after 50% green.
  2. Threshold – On basis of this value, theme will change
  3. Added one more theme – red
  4. We can show value inside component in three format now – percentage, Actual value or Mix
  5. Legend font size changes according to size of component

Continue reading “Circular Progress Bar with Conditional Theme – Salesforce Lightning Component”

How to Document Lightning Component

Demo and Example, showing process of documenting Lightning Component

Its extremely important to keep and maintain the documentation of your newly built (and all existing) Lightning component. So that it can be easy to understand and easy to reuse. It will not take much time for your Salesforce Org to flood with Lightning components.

We will take example of previous post, where I shared source code of Circular Progress Bar Lightning Component.

First, we will create a new Lightning Component which will have possible examples of using Lightning Component. Continue reading “How to Document Lightning Component”

Circular Progress Bar – Salesforce Lightning Component

Demo and Complete Source code of Circular Progress Bar, Salesforce Lightning Component

In this blog post we will create reusable Lightning Component to show progress of record using Circular Progress Bar. This component is mostly build using CSS. Javascript is used only for Lightning component support and calling Apex Class. Check video demo here on how to configure and use this component.

Note – There is updated version of this component here.

Circular Progress Bar LEX Component Capabilities

  1. Size – small, medium , large
  2. Theme – blue, orange , green
  3. Legend – Legend to display
  4. Total – Either Number Or API Name of field. Used to derive percentage of Progress Bar
  5. Actual – Either Number Or API Name of field. Used to derive percentage of Progress Bar. If Object contains percentage type of field, then Total can be blank and this field can only contain API name of field of type percentage

Continue reading “Circular Progress Bar – Salesforce Lightning Component”

Calling Apex method at regular interval from Lightning Component

Importance of $A.getCallback and Modifying Components Outside the Framework Lifecycle

Recently, I was in need of Lightning Component, which can poll Apex class at regular interval and display status of some process running in background. Initially, I thought its very easy and straight forward. Just like we do in Visualforce, use window.setInterval method of Javascript and I came up with below code. Continue reading “Calling Apex method at regular interval from Lightning Component”

Automated Code review for Apex in Salesforce – Static code analysis – Video

Using open source PMD tool to generate code quality report for Apex classes

PMD is very well known source code analyzer for Java, android and many more languages. Good news for us (Salesforce developers) is , that it supports now Apex. You might be thinking how can we make PMD as part of our daily life ?

There are multiple ways

  1. We can run static code analysis standalone
  2. It can be part of ANT build to generate error reports
  3. Jenkins can use it to generate nice report around code quality
  4. Eclipse can use it as a plugin to generate report

In this blog post, we will discuss option 1, that is running it as a standalone application to generate code quality report.

First Step is to download jar file of latest PMD distribution from here. Continue reading “Automated Code review for Apex in Salesforce – Static code analysis – Video”

Get Selected HTML or Lightning component in Aura Iterator

How to detect event from Lightning Component and HTML5 components in Aura Iterator

Coming from Visualforce background, most of us are well aware about repeater component. Same way, Lightning also offers iterator component.

Detecting Selected Lightning Component in Iterator

Usage is very simple, It is used to iterate over collection and render some HTML / Lightning component dynamically as shown below

<aura:component>
  <aura:iteration items="1,2,3,4,5" var="item">
    <meter value="{!item}"/>
  </aura:iteration>
</aura:component>

In above example, each element in collection can be referred using variable “item”. Most of time we find ourselves in situation where we need to get value or component selected in iterator. As we don’t know upfront, how many items would be there, so identifying selected item at run time seems little bit tricky but believe me it easy. Continue reading “Get Selected HTML or Lightning component in Aura Iterator”

Where to find me in Dreamforce 2016

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with Leave a comment on Where to find me in Dreamforce 2016

Find me at Brain Dating , Cognizant Booth , Community Powered Circle Sessions and Admin Meadow in Dreamforce 2016

Hey All,

Its time of year again where we will get a chance to meet personally in virtually connected world. I know most of you either on Facebook, Twitter or Youtube, let’s plan to connect this Dreamforce.

  • My Session in Dreamforce
    My Session in Dreamforce
  • MVP's in Dreamforce
    MVP's in Dreamforce
  • Sassy in Dreamforce
    Sassy in Dreamforce
  • Meeting with Friends
    Meeting with Friends
  • Parker Harris in Lightning Suit
    Parker Harris in Lightning Suit
  • Do you see my name there ;)
    Do you see my name there 😉
  • Dreamforce Keynote
    Dreamforce Keynote

So, like all previous Dreamforce, this year as well I would be involved in some activities . Question is, where can we meet ? Well, here are some details about me. Please don’t hesitate to comment on this blog about availability, place etc.

Brain Dating

This is a new event in Dreamforce 2016 and I am totally excited about this. We would be exchanging best practices and challenges on pre-decided topic. I would be discussing on two topics Continue reading “Where to find me in Dreamforce 2016”

Use Lightning Component in Visualforce Page

How to use Lightning Out to surface Lightning Component on Visualforce Pages

In all of my projects currently, I have stopped creating Visualforce code. well, thats partially correct ;). I still need Visualforce page because most my clients are still on classic / Aloha Salesforce. However, If you have noticed, all Salesforce release notes, talks, webinars, Dreamforce focuses on Lightning experience. And I can say with confidence that Lightning is really really very cool. Sky is limit to your imagination, You can unleash hidden talent within you. Well, all talk talk… and you may be thinking, how can I start with Lightning Component? My client don’t even want to move away from classic. Its lots of work and money for them.

Well, here is an Idea what I am doing. I still uses Salesforce classic, still uses Visualforce but behind the scene, magic… tadaaa , Lightning Component. I will show walk you through this, how its being done.

We will use existing Flipcard Lightning Component to display on Visualforce page. Once Lightning Component is created, we need to create a Lightning Application to act an as a container. Continue reading “Use Lightning Component in Visualforce Page”

Flipcard Lightning Component

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with Leave a comment on Flipcard Lightning Component

A simple CSS based animated Flip card Lightning Component for beginners

There could be situation where we want to display a calculation or summary of some records. This information sometimes needed to be stand out from other piece of data on same page. We may also need component where number is displayed in big text and when cursor is moved, related information explaining calculation should be displayed. It can be achieved in many ways and one of them is to have animated flip card where information can be swapped on cursor hover event.

In this post, we will create a very simple animated Flip card Lightning component. This component will support following properties

  • Animation direction horizontal or Vertical
  • Background color
  • font color
  • border color
  • Text on front size
  • Text on back side

Continue reading “Flipcard Lightning Component”