How to create Connected Apps in Salesforce

1. Go to Apps.

2. Click New in Connected Apps section.

3. To get Client Secret and Client Id, set Enable OAuth Settings check box to true.

4. Use Consumer Key and Consumer Secret as Client Id and Client Secret.

To know about connected apps, check the below link

How to get Access Token from Salesforce?

To get Access Token from Salesforce

URL - or

Method - POST



To get client_id and client_secret, use the below link

From POSTMAN Client in Google Chrome


Resource - /services/oauth2/token

What is the use of Guage Component in Saleforce Report?

A gauge is used to see how far you are from reaching a goal. It displays a single value.

Knowledge Users Report

Say, you have Total Knowledge Users License Available is 10. We can use Guage component to see how many Knowledge licenses are utilized and how many are still remaining.

My Unresolved Items in Salesforce

When you use Salesforce for Outlook, Lightning Sync, or Email to Salesforce to sync items or add emails from your email app to Salesforce, any items that these features can’t automatically assign to Salesforce records appear in My Unresolved Items.

My Unresolved Items displays data from

1. Contacts
2. Events
3. Emails
4. Tasks

How can we add Libraries to the Salesforce Community?

1. In Community Builder, drag the new Files List component onto a page. This gives your community members a one-stop view of all their files while letting them do useful things like uploading and previewing. Use the Property Editor to customize the Files List display. Choose the number of records to display on the page at once. Try out different settings to get the look you want.

2. Publish the Community changes and view it.

Apex Switch Statement in Salesforce

Simplify Your Code with the Apex Switch Statement 
Apex now provides a switch statement that tests whether an expression matches one of several values and branches accordingly.

Apex switch statement expressions can be one of the following types.

Sample Code:

for ( Integer i = 1; i <= 3; i++ ) {

switch on i {

when 1 {
System.debug('When block 1');

when 2 {
System.debug('When block 2');

when 3 {
System.debug('When block 3');

when else {



Salesforce Summer ’18 Release Highlights

Simplify Your Code with the Apex Switch Statement 
Apex now provides a switch statement that tests whether an expression matches one of several values and branches accordingly.

Apex switch statement expressions can be one of the following types.

Sample Code:

switch on i {
   when 2 {
       System.debug('when block 2');
   when -3 {
       System.debug('when block -3');
   when else {


Create New Sub Folder in Salesforce Reports and Dashboards

One of the most common requests from a custom user interface is to provide a form to view or edit a record. This functionality has now been boxed up for you as lightning:recordForm. With this base component, you can point to a record object (standard or custom) and have the form composed for you.

You can base the form on a layout (Full or Compact).

Set the mode attribute to view, edit, or readonly to specify the type of form. This form was created by specifying mode="edit" to add a record.

Update data with editable data tables in Lightning Component
lightning:dataTable has received a few improvements including the ability to mark a cell as editable. This allows you to flag specific data points that you want users to be able to update.

Sample Code:
cmp.set('v.contactcolumns', [
       {label: 'First Name', fieldName: 'FirstName', type: 'text', editable: true},
       {label: 'Last Name', fieldName: 'LastName', type: 'text', editable: true},
       {label: 'Email', fieldName: 'Email', type: 'text', editable: true}

Account-Based Marketing Dashboard
The Account-Based Marketing dashboard helps marketing and sales work together to drive key accounts to close. Marketing can see overall pipeline and has insight into account-based sales activities. Sales can see the number of contacts engaged per account and which campaigns worked best to drive those connected personalized conversations.

Sales Cloud Einstein Mobility
Maximize every selling moment even when you are on the go with Sales Cloud Einstein Account and Opportunity insights now available on mobile.

Einstein Bots
Increase case deflection and reduce handle time with AI-powered chatbots. Natively built on the Salesforce platform, Einstein Bots can be set up declaratively and are pre-integrated into your CRM data and real-time channels. Use Einstein Bots to collect and qualify customer information to resolve routine issues or seamlessly escalate to an agent for fast resolution.

Omni-Channel Skills-Based Routing
Ensure that cases are always routed to the right agent, to solve the case the first time, with Omni-Channel skills-based routing. Automatically push cases to agents based on their skill set, availability, and capacity through the power of the Omni-Channel Routing engine.

Pre-Built Themes in Community Cloud
With pre-built themes, you can create a visually stunning experience for visitors, using clicks, not code. To create your experience, you can start from a library of pre-built themes in Lightning Community Builder. Plus, you can take advantage of themes for your existing communities, as well.

Community 360 Enhancements
With Community 360, agents can see what customers have been engaged in to deliver seamless service. The Summer '18 enhancements let agents see even more. Now, they can get a full view of customer interactions with assets, contracts, custom objects, orders, products, and tasks in the community.

Pinned Posts
Now, you can make sure that the most important information gets the right amount of attention within your community. With pinned posts, you can pin up to three posts to each topic or group feed.

Moving reports and dashboards to different folders in Salesforce

Language Analyzer for Site Search in Commerce Cloud
Language analyzers are an important feature for site search. A language analyzer understands the characteristics of a specific language (like apostrophes, French accents, Greek characters, and more), and increases the relevancy of search results.

Mass Email Contacts and Mass Email Leads in Salesforce

1. Create an Email template and a list view. Make sure the list view is not reaching more than 10 records.

2. Go to Contacts tab for Mass Email Contacts and Lead tab for Mass Email Leads.

3. Select the list view.

4. Click Go.

5. Select the email template and click Send.

DML Operation in getter or setter method in Salesforce

You cannot use DML (Data Manipulation Language) operations in getter or setter methods in Salesforce.

The getter and setter are invoked either by your code, or if you are writing visualforce controllers, the getters are executed when the page is rendered and the setters are executed when a form is posted back to the controller. We cannot consider getter or setter method for doing DML operations in the code.

The "get" method is used to pass data from your Apex code to your Visualforce page. The "set" method is used to pass values from your Visualforce page to the controller.

Check the below link for more information

Scenarios that may cause "DML currently not allowed" are

1. Venturing a DML operation within a component controller where allowDML=false.

2. DML operation within a class constructor.

3. DML operation within a getter or setter.

Connect Salesforce from Spinify

Spinify is used to solve adoption and engagement issues by using its Lively Leaderboards.

To connect Salesforce from Spinify, check the below steps.

1. Go to Integrations in Spinify.

2. Click Salesforce Connect button.

3. Follow the link and install the AppExchange product.

4. Go to Spinify app in Salesforce after the installation and follow the steps to Sign In.

To Sync Salesforce Objects:

If you face any issue, please check the below link

Storable Action in Lightning in Salesforce

Enhance your component’s performance by marking actions as storable to quickly show cached data from client-side storage without waiting for a server trip. If the cached data is stale, the framework retrieves the latest data from the server.

The storable action might result in no call to the server. Never mark as storable an action that updates or deletes data. For storable actions in the cache, the framework returns the cached response immediately and also refreshes the data if it’s stale. Therefore, storable actions might have their callbacks invoked more than once: first with cached data, then with updated data from the server.

To mark a server-side action as storable, call setStorable() on the action in JavaScript code, as follows.


The setStorable function takes an optional argument, which is a configuration map of key-value pairs representing the storage options and values to set. You can only set the following property:


To use ignoreExisting attribute:

        ignoreExisting: true

Set to true to bypass the cache. The default value is false.
This property is useful when you know that any cached data is invalid, such as after a record modification. This property should be used rarely because it explicitly defeats caching.

Storable actions are automatically configured in Lightning Experience and the Salesforce mobile app. To use storable actions in a standalone app (.app resource), you must configure client-side storage for cached action responses. To configure client-side storage for your standalone app, use <auraStorage:init> in the auraPreInitBlock attribute of your application’s template. For example:

Sample Code:

<aura:component isTemplate="true" extends="aura:template">
    <aura:set attribute="auraPreInitBlock">
          defaultAutoRefreshInterval="30" />


The storage name must be actioned. Storable actions are the only currently supported type of storage.

Set to true to preserve cached data between user sessions in the browser.

Set to true to encrypt cached data.

The maximum size in KB of the storage.

The duration in seconds that an entry is retained in storage.

The duration in seconds before an entry is refreshed in storage.

How to abort the storage action?

Mark an action as abortable to make it potentially abortable while it's queued to be sent to the server. An abortable action in the queue is not sent to the server if the component that created the action is no longer valid, that is cmp.isValid() == false. A component is automatically destroyed and marked invalid by the framework when it is unrendered.

var action = cmp.get("c.serverEcho");

Onboarding & Assistance for Lightning Experience in Salesforce

Encourage Users to Work in Lightning Experience.

Only users with access to Lightning Experience see the feature prompts.

1. Go to Onboarding & Assistance.

2. Enable Onboarding & Assistance.

When the user is working in Salesforce Classic, the prompt appears for:

1. Any production org with Lightning Experience turned on
2. Any user who has the Lightning Experience User perm, which grants access to Lightning Experience

If your org hasn’t opted into extended Internet Explorer 11 support for Lightning Experience, anyone using IE11 doesn’t see this prompt.

Dynamic Owner for record creation in Process Builder in Salesforce

In the above example, if the Account Approver field is blank, the current user id is used as Owner Id else Account Approver will be the Owner Id for the case record.

How to deactivate Implicit Sharing when Sales Reps move within the organisation in Salesforce?

Implicit sharing is automatic. You can neither turn it off, nor turn it on. It is native to the Salesforce Platform. In other words, this isn't a configurable setting available in Salesforce.

To remove User's implicit access to the account, you have to remove his/her access to Opportunities, Cases, or Contacts under it. Develop a batch to take care of this.

Using Mass Transfer records will allow transferring Accounts, Opportunities, Contacts and Cases.

1. Go to Mass Transfer Records.

2. Click Transfer Accounts.

3. Select the appropriate options.

How to retrieve translations using Metadata API?

Sample Package.xml:

<Package xmlns="">

How to give Network object access in Salesforce to a user?

1. Go to All Communities.

2. Select Workspace.

3. Select Administration.

4. In Members section, select the user profile so that the user will get access to Network Object.

How to set Calendar Sharing Settings in Salesforce?

1. Hide Details - Others can see whether the user is available at given times, but can not see any other information about the nature of events in the user’s calendar.

2. Hide Details and Add Events - In addition to the sharing levels set by Hide Details, users can insert events in other users’ calendars.

3. Show Details - Users can see detailed information about events in other users’ calendars.

4. Show Details and Add Events - In addition to the sharing levels set by Show Details, users can insert events in other users’ calendars.

5. Full Access - Users can see detailed information about events in other users’ calendars, insert events in other users’ calendars, and edit existing events in other users’ calendars.

Difference between component.find() component.get() in Salesforce Lightning


component.get(String key) and component.set(String key, Object value) retrieves and assigns values associated with the specified key on the component. Keys are passed in as an expression, which represents attribute values.


find() returns different types depending on the result.

1. If the local ID is unique, find() returns the component.
2. If there are multiple components with the same local ID, find() returns an array of the components.
3. If there is no matching local ID, find() returns undefined.

component.find() works in a more broader way whereas component.get() is associated with attributes. find() method can be used to work on tags having same id's simultaneously.

How to get object sharing setting on Organization-Wide Defaults (OWD) using Apex?

Use the below query for Standard objects.


SELECT Id, DefaultAccountAccess, DefaultContactAccess, DefaultLeadAccess, DefaultOpportunityAccess FROM Organization

How to fix lightning sync status - User recognized by Google service account in Salesforce?

To fix lightning sync status - User recognized by Google service account in Salesforce, make sure the email address in the User detail is correct. It should be Gmail email address mapped to the GSuite account.

User Detail page:

Lightning Sync Status:

Setup CPQ Product Layout Salesforce

Setup CPQ Product Layout to view all fields related to CPQ while adding products.

How to create Product Families and select for product in Salesforce?

1. Go to Product Fields.

2. Select Product Family field.

3. Click New.

4. Enter the values.

5. Click Save.

How to configure Product Description in Salesforce CPQ?

1. Create a Rich Text area field in Product object and go to Installed Packages.

2. Click Configure in Salesforce CPQ packages.

3. Go to Additional Settings and change the field to which you want to map.

How to group Products in Quote creation in Salesforce CPQ?

1. Go to Installed Packages.

2. Select Salesforce CPQ.

3. Select Additional Settings.

4. Select a field in How to group Products.

5. Click Save button.

6. Go to Add products screen.

Block Pricing in Salesforce CPQ

1. Make the Pricing Method to Block.

2. Create Block Prices records from the product's related list. 

How to import Quote lines in Salesforce CPQ?

1. Go to Import Formats.

2. Click New and create a new Import Format.

3. Click New Import Column in Import Columns related list.

4. Create Import Columns.

5.  Go to Quote and click Import Lines button.

6. Select the Format and File to import.

How to handle attribute value change in lightning components in Salesforce?

The aura:valueChange event is used to handle attribute value change in lightning components in Salesforce.

Sample Code:


<aura:component implements="force:appHostable">
    <aura:handler name="change" value="{!v.strText}" action="{!c.handleValueChange}"/>
    <aura:attribute name="strText" type="string" default="Sample"/>
    <div class="slds-box slds-theme_default">
        <lightning:input value="{!v.strText}" type="text" label="Text"/><br/>
        <lightning:button variant="brand" label="Update" onclick="{!c.clickIt}"/>


    clickIt : function(component, event, helper) {
        component.set("v.strText", "Changing");
    handleValueChange : function (component, event, helper) {
        alert("Changed strText " + component.get("v.strText"));


Summary Variables in Salesforce CPQ

Summarize number field information about products into a single object called a summary variable. You can then reference the summary variables in your quotes, quote line fields, and product rules.

1. Go to Summary Variables tab.

2. Click New to create Summary Variable.