Quotes from Sadhguru – Jagadish Vasudev

I often read quotes from Sadhguru and also watch discussions from Sadhguru on YouTube. As you read this, you may wonder who is Sadhguru.

As per Wikipedia, Sadhguru (born Jagadish Vasudev, 3 September 1957) is the founder and head of the Isha Foundation, based in Coimbatore, India. The foundation, established in 1992, operates an ashram and yoga centre that carries out educational and spiritual activities. Sadhguru has been teaching yoga since 1982. He is the author of the New York Times bestsellers Inner Engineering: A Yogi’s Guide to Joy and Karma: A Yogi’s Guide to Crafting Your Destiny, and a frequent speaker at international forums.

Sadhguru describes life as “This life for me is an endeavor to help people experience and express their divinity. May you know the bliss of the Divine. –Sadhguru”

Here are some of the quotes from Sadhguru, an Indian yogi, spiritual leader, and author:

  1. “The ultimate truth is not something that you can put into words. It is something that you experience.”
  2. “The most important thing in life is not what you get, but what you become.”
  3. “To experience life, you have to be open to the unknown. When you are open to the unknown, life is an adventure.”
  4. “The only way to live life is to be in the present moment. If you are not in the present moment, you are missing your life.”
  5. “The only way to grow is to constantly question and challenge your own limitations. When you do this, life becomes a thrilling adventure.”
  6. “The only way to be truly happy is to be in a state of inner peace. Inner peace comes from being in harmony with the world within and without.”
  7. “To be truly successful in life, you must be in a state of constant evolution. When you are evolving, you are constantly growing and becoming better.”
  8. “The ultimate purpose of life is not to achieve material success, but to realize your own ultimate potential and become one with the universe.”

Sadhguru is dedicated to the physical, mental and spiritual wellbeing of humanity and gifted with utter clarity of perception, Sadhguru possesses a perspective on life and living that never fails to intrigue, challenge, and surprise all those he encounters.

Salesforce Winter ’23 Features

The Winter ’23 release for Salesforce is packed with new features and enhancements that are sure to excite users. Here are some of the top features of this release:

  1. Enhanced Object Record Pages with Dynamic Forms: With the Winter ’23 release, users can now create dynamic forms for object record pages. This allows users to customize the information displayed on these pages, making it easier to view and manage key data.
  2. Improved Dynamic Related List Filters: The dynamic related list filters in Salesforce have been enhanced, making it easier for users to quickly find and access related records. Users can now filter related lists by multiple criteria, making it easier to find the information they need.
  3. Boosted Permission Sets: The Winter ’23 release includes several enhancements to permission sets, including the ability to grant permissions to specific users and the ability to easily manage and track which users have which permissions. This makes it easier for organizations to control access to sensitive data and ensure that users have the right level of access.
  4. Permission Set Expiration and Enhanced UI: The Winter ’23 release includes the ability to set expiration dates for permission sets, as well as an improved user interface for managing and tracking permission sets. This makes it easier for organizations to manage access to sensitive data and ensure that users only have access to the data and tools they need.
  5. Collaborative Forecast Funnels: The Winter ’23 release includes a new collaborative forecast funnel feature, which allows teams to work together to create and manage their sales forecasts. This makes it easier for teams to align on their sales goals and work together to achieve them.
  6. Customizable Home Pages: With the Winter’23 release, users can now customize their home pages to better suit their needs. This allows users to easily access the information and tools that are most important to them, making it easier to work efficiently.
  7. Improved Search: The search functionality in Salesforce has been improved, making it easier for users to find what they are looking for. The search bar now displays recent searches and popular searches, making it easier to find the information you need.
  8. Enhanced Email Features: The email functionality in Salesforce has been enhanced, making it easier to manage and track emails. Users can now add attachments directly from their computer, and can also track email opens and clicks.
  9. Improved Mobile Experience: The Winter’23 release includes several enhancements to the mobile experience, including the ability to add and edit records on the go. This makes it easier for users to stay productive while on the go.
  10. Better Collaboration: The Winter’23 release includes several features that make it easier for teams to collaborate, including the ability to share files and documents, and improved commenting and @mention functionality.

Overall, the Winter ’23 release for Salesforce is full of exciting new features and enhancements that are sure to improve the user experience. Whether you’re a salesperson, customer service representative, or marketer, there’s something in this release for everyone.

Salesforce Weekly: Feb 23, 2018

Salesforce, such an amazing platform. It’s growing every day with more features for every industry, developers and products. Of course, one also needs to learn the system to be able to use it or build around it. There is salesforce documentation, trailhead, developer guides, implementation guides, webinars, white papers, and blogs; every medium is out there filled with information.

It’s an information avalanche and more is being published every week and it’s very hard to keep track of it all. Although, it seems impossible, purpose of Salesforce Weekly in my blog is to try and keep track of all these, compile a list and publish. Hopefully, someone will find these compiled resources helpful.

Without further ado, let’s get started:

Salesforce Developers Blog

  1. All About Salesforce Extensions for VS Code
  2. Getting Started with Salesforce DX (Part 4 of 5)
  3. Announcing Developer Controlled Packaging (DCP) Beta

Salesforce Admin Blog

  1. Interview: New Spring ’18 Customizations with Joe Ryan
  2. 5 Ways to Increase Productivity with List Views
  3. Take Advantage of the New Custom Time Field in Spring ’18
  4. Insight: Best Practices for Being a Productive Admin

Salesforce Webinars

  1. Salesforce DX Product Manager AMA – Feb 27, 2018
  2. Einstein Analytics for Developers – Mar 15, 2018

Salesforce.org Blog

  1. Paperless Program Delivery: 2 Nonprofits that Went Digital with Salesforce NPSP
  2. Nonprofit Direct Mail on Salesforce, Part 12: Reporting
  3. An intro to AI for Good from Salesforce.org
  4. Planning for Your Salesforce Project
  5. Ask an Architect: 5 Steps to an Effective Salesforce Data Management Strategy

The Salesforce Admins Podcast

  1. Admin podcast

Biswajeet Samal’s Blog

  1. Apex String Methods to Determine Character Types

Automation Champion

  1. Getting Started with Pardot – Part 16 (Delight Sales Team with Pardot’s lead scoring and grading framework)

Nerd @ Work

  1. [Salesforce / Amazon Echo] AlexForce 2.0: integrate Salesforce and Alexa (the ultimate Apex library)

Paul Battisson

  1. LEARNING HOW TO BE A BETTER LEARNER

Well, here is the first delivery of Salesforce Weekly. Let’s see if I can stay consistent and deliver the next one on time. Wish me luck!

Salesforce: Make Ajax calls with Lightning Components

LockerService has been a source of frustration for many Lightning component developers. But the fact remains that LockerService is here to stay. It’s an important part of security in when using Lightning components from different sources.

LockerService is not just bad news. Now that it’s mandatory, developers can use many long-awaited features. One of those is making Ajax calls directly from Lightning components. This blog will walk you through a demo of making an AJAX call to Google APIs to get information about a location.

Let’s start by going to SetupCSP Trusted Sites and adding https://maps.googleapis.com as a trusted site. This will allow a Lightning component to make a call to this domain and get information back.

First I decided to build a utility component that can be called from any component to make an Ajax call and process result. Feel free to use this component for demo or actual use as needed.

Utils.cmp

<aura:component >
    <!-- Define method to be called by other components -->
    <aura:method name="callAjax" action="{!c.callAjax}">
        <!-- Method can be, for example, GET or POST -->
        <aura:attribute name="method" type="String" default="GET" />
        <!-- URL to call -->
        <aura:attribute name="url" type="String" />
        <!-- Whether the call should be sync or async -->
        <aura:attribute name="async" type="Boolean" default="true" />
        <!-- Callback method on call complete -->
        <aura:attribute name="callbackMethod" type="Object" />
    </aura:method>
</aura:component>

UtilsController.js

({
    callAjax : function(component, event, helper) {
        //Creaet new request
        var xmlhttp = new XMLHttpRequest();
        //Handle response when complete
        xmlhttp.onreadystatechange = function(component) {
            if (xmlhttp.readyState == 4 ) {
                console.log('xmlhttp: ' + xmlhttp);
                params.callbackMethod.call(this, xmlhttp);
            }
        };

        var params = event.getParam('arguments');
        if (params) {
            console.log('params:', params);
            //Set parameters for the request
            xmlhttp.open(params.method, params.url, params.async);
            //Send the request
            xmlhttp.send();
        }
    }
})

XMLHttpRequest.cmp

<aura:component >
    <!-- Address to send Google to get more information -->
    <aura:attribute name="address" type="String" access="global" default="1 Market St, San Francisco, CA 94105, USA" />

    <!-- Google API key to send if needed; OPTIONAL -->
    <aura:attribute name="apikey" type="String" access="global" />


    <!-- Message information for ui:message component -->
    <aura:attribute name="msg" type="String" default=""/>
    <aura:attribute name="msgSeverity" type="String" />
    <aura:attribute name="msgTitle" type="String" />

    <!-- Add utils component to use aura:method -->
    <c:Utils aura:id="utils" />

    <div class="slds">
        <!-- User input to ask for address and API key if needed -->
        <lightning:input type="text" label="Address" name="{!v.address}" value="{!v.address}" />
        <lightning:input type="text" label="API Key" name="{!v.apikey}" value="{!v.apikey}"/>

        <!-- Send request to Google on button click -->
        <lightning:button label="Call Ajax" onclick="{!c.buttonPress}" />

        <!-- Display errors or return text on success -->
        <aura:if isTrue="{! v.msg != '' }">
            <ui:message severity="{!msgSeverity}" title="{!v.msgTitle}">
                {!v.msg}
            </ui:message>
        </aura:if>
    </div>
</aura:component>

XMLHttpRequestController.js

({
    buttonPress : function(component, event, helper) {
        //Generate URL for request to Google APIs
        var url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' + component.get('v.address');

        //Add API key if provided
        if(!$A.util.isUndefined(component.get('v.apikey'))){
            url += '&key=' + component.get('v.apikey');
        }

        //Make Ajax request
        helper.makeAjaxRequest(component, url);
    }
})

XMLHttpRequestHelper.js

({
    makeAjaxRequest : function(component, url) {
        var utils = component.find('utils');
        
        //Make Ajax request by calling method from utils component
        utils.callAjax("POST", url, true,
                        function(xmlhttp){
                            console.log('xmlhttp:', xmlhttp);

                            //Show response text if successful
                            //Display error message otherwise
                            if (xmlhttp.status == 200) {
                                component.set('v.msg', xmlhttp.responseText);
                                component.set('v.msgSeverity', 'information');
                                component.set('v.msgTitle', 'Success');
                            }
                            else if (xmlhttp.status == 400) {
                                component.set('v.msg', 'There was an error 400');
                                component.set('v.msgSeverity', 'error');
                                component.set('v.msgTitle', 'Error');
                            }else {
                                component.set('v.msg', 'Something else other than 200 was returned');
                                component.set('v.msgSeverity', 'error');
                                component.set('v.msgTitle', 'Error');
                            }
                        }
                      );
    }
})

On success, you should see return response from maps.googleapis.com for provided address.

This is a very welcome change and will solve many issues now that we can make calls directly from Lightning components. I came across it this week and wanted to test and share it here.

Note: Source code used in this blog is available at https://github.com/jrattanpal/Blog-LC-Ajax

Salesforce: Implement Google Maps in Lightning Components

I don’t think I need to introduce Salesforce and Google Maps. If I do then maybe this blog is not for you. Visualforce has been in salesforce for a while and works amazingly well with Google Maps. But now we have lightning components. Do Google Maps work in lightning components?

The short answer is, no. This is because of locker service. Google Maps add multiple <script> tags when loaded. With locker service enabled, this is not possible due to security restrictions.  Currently you can disable locker service but eventually it will be mandatory. So, is there any other way Google Maps can work in lightning components?

YES, Google Maps work in Lightning components. To get Google Maps to work in lightning components we will need to implement maps in visualforce page and embed in lightning components as iFrame. One library that locker service team opened in locker service is window.postMessage. This allows lightning components to send/receive messages to/from visualforce pages. We could use this library and implement Google maps.

I am sure by now you’re all wanting to get into the code. Well, let’s get to it.

Use Case

We will go through Account list and show all the accounts on Google map based on BillingAddress.

Pre-requisites

Following are some of the pre-requisites to get this demo to work:

  • You need to get a free Google API key for using Google Maps
  • Google Maps work with longitudes and latitudes and not addresses. If we want to display accounts on maps then we will need to get long/lat for these accounts. For this, we need to enable “Data Integration Rules” for account.
    • This can update existing records (if you choose to) or automatically setup Long/Lat for new accounts.

Demo

[youtube https://www.youtube.com/watch?v=1w_5B2yxrXo?ecver=2&w=480&h=360]

 

Implementation

Now that we have setup the use case and have the data ready for this, let’s dive into code. More information about architecture and access to source code is available in github:

  • GoogleMap.cls:
    • This class returns list of all accounts which have BillingLatitude and BillingLongitude
    • Do note that using “!=” in a SOQL query can impact performance; we used it just for demo purposes
  • GoogleMap.page:
    • This page can send/receive messages to/from Lightning components
    • It receives a parameter “lcHost” which will be Lighting component URL to send messages to components on Lightning component URLs; required when using window.postMessage
    • Once page loads, visualforce will send a message to Lightning component that page was successfully loaded
      • Lightning component has no way to know when iFrame is loaded and when to send data for map
      • If we try to do it before iFrame is ready then we will get an error as we try to send data to non-existent page
    • Upon receiving Google map data, Google map library will be loaded and data will be used for drawing map
    • Note: We could have used <apex:map> but I wanted to display multiple accounts and also be able to control different settings for Google maps
  • GoogleMap.cmp:
    • This component will receive Google map options and data provided by calling component
      • This allows the component to be used from any component and not just Account because component just expects data in pre-defined format
    • Once visualforce page has been loaded (LC is notified by visualforce via an event), Lightning component will send data to visualforce page
  • DemoApp.app: Application:
    • DemoApp loads account information on init
    • That information is sent to GoogleMap component for Google Map on visualforce page

Architecture

This was tested in Spring’17 org and works fine even with Locker Service. On the outside, it all looks very complicated but once it has all been setup it looks very promising. window.postMessage library is very promising and offers opportunities for many use cases.

What are you waiting for? Go ahead and get it to work!!

Salesforce: Hey, Do You Know?: Is it possible to use Encrypted Fields with Formula Fields?

The short answer is, YES.

But, it’s always nice to have more details. So, let’s get to it.

Salesforce Shield protects your enterprise with point-and-click tools that enhance trust, transparency, compliance, and governance across all of your business-critical apps. Salesforce Shield consists of 3 products:

Shield Platform Encryption gives your data a whole new layer of security while preserving critical platform functionality. It enables you to encrypt sensitive data at rest, and not just when transmitted over a network, so your company can confidently comply with privacy policies, regulatory requirements, and contractual obligations for handling private data.

Platform Encryption is evolving over time to include many use cases. One of the use cases is, to be able to use Encrypted Field with Formula Fields.

As of now, this feature is not available. Lack of this feature results in many workarounds of reduced functionality. For example: if we decide to encrypt a field then we can’t use that field in formulas, or if want to use it in formulas then…..well, you get it.

Spring’17 brings with it a new beta feature. This will allow users to use encrypted fields with formula fields. More information this feature is at https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_security_pe_formulas.htm.

“You can use several operations and functions, including concatenate (& and +), isBlank, isNull, if, hyperlink, and image. You can reference Quick Actions, and render encrypted data in text, date, and date/time formats. What’s more, your formulas can reference an unlimited number of encrypted fields, giving you even more of the data you’re looking for.”

Keep in mind that this is a “Beta” feature. It means that there might be some known limitations. For example, at the time of this blog, this feature doesn’t work if you want to use LEN in your formula.

To enable this feature, you can log a case with salesforce. It seems likely that this might be a GA feature in Summer’17. But as always, Salesforce’s “safe harbour” rule applies here.

Well, what are you waiting for? if you need it then go ahead and log a case.

And remember,………have fun!!

Salesforce: Hey, Did You Know?: Can you use Third-Party Libraries in Lightning Components?

One highly sought after feature (among others) in Lightning Components was, being able to use third-party frameworks/libraries in lightning components. When lightning components were released, it was hinted that we will eventually be able to use those libraries. Everyone (or at least I was) was holding their breath to see how it will unfold. Main problem was security. Some frameworks like Angular/React take over entire DOM and rebuild it. But that couldn’t be allowed in lightning components due to data sensitivity.

But the wait is over! Yes, we finally have a way to use these libraries in lightning components. It strikes a nice balance between security and usability.

If you haven’t already guessed then I am talking about “Lightning Container”. You can create an app in HTML, zip it up, store it as a static resource and embed it in your components. The embedded HTML page is loaded in a different DOM (with limited access to the parent DOM) and runs in its own context. But without being able to talk to your component it will be quite useless, won’t it?

Fear not, the Lightning Container Component (lightning:container) is a convenience component that wraps an iframe and provides a simple API to communicate between the iframe container and its content. Following are some of the resources that can get you started:

Let’s start this amazing journey together!!!

Salesforce: Hey, Did You Know?: What is Financial Services Cloud?

Financial Service Cloud is built on top of sales cloud as a managed package. All partner applications built on Financial Services Cloud are technically extension packages of Financial Services Cloud managed package.

Financial Services Cloud still does 3 releases a year which match with Salesforce releases. New features are continually being added to this cloud. For latest features, you can check spring’17 release notes.

Salesforce: Hey, Did You Know?: What is the difference between Lightning Application events vs Component events?

Application Events:

Application events follow a traditional publish-subscribe model. An application event is fired from an instance of a component. All components that provide a handler for the event are notified.

 

Component Events:

A component event is fired from an instance of a component. A component event can be handled by the component that fired the event or by a component in the containment hierarchy that receives the event.