Divisions in Salesforce

Divisions let you segment your organization's data into logical sections, making searches, reports, and list views more meaningful to users. Divisions are useful for organizations with extremely large amounts of data.

Divisions can be assigned to users and other kinds of records. For example, you can create a report to show the opportunities for just the North American division to get accurate sales numbers for the North American sales team.

Record-level division - Division is a field on individual records that marks the record as belonging to a particular division. A record can belong to a division created by the administrator or the standard “global” division. The standard global division is created automatically when your organization enables divisions. A record can belong to only one division at a time.

Default division - Users are assigned a default division that applies to their newly created accounts, leads, and custom objects that are enabled for divisions.

Working division - If you have the “Affected by Divisions” permission, you can set the division using a drop-down list in the sidebar. Then, searches show only the data for the current working division. You can change your working division at any time. If you don’t have the “Affected by Divisions” permission, you always see records in all divisions.

Divisions are not available by default in Salesforce. Contact Salesforce support to enable Divisions in your organization.

Enabling Divisions have prerequisites. Check the below link for the prerequisites


Division cannot be used for hiding records.

Suggested Articles in Salesforce

Salesforce Lightning Experience:
1. Go to Support Settings.

2. Select "Enable suggested articles".


Salesforce Classic:
1. Go to Support Settings

2. Enable Suggested Articles.


BigObjects in Salesforce

BigObjects let you store and manage large amounts of data on the Salesforce platform.
Within Force.com, objects are used to store and access data. Different kinds of objects are provided with different capabilities to align with different use cases. Standard Objects store data as defined by Salesforce while Custom Objects are created to store information unique to your organization. External Objects are provided to connect to data that is stored outside of your Salesforce organization.

To create a BigObject

1. Go to Create --> BigObjects.

2. Click New.

1. BigObject can be exposed to REST, SOAP, BULK and MetaData APIs.

2. Supports Synchronous and Asynchronous SOQLs.

3. Reports and Dashboards are possible.

4. Search is not supported.

5. Supports aggregate function in the query.

Check the below link for more info


RubyInstaller for Windows

1. Go to https://rubyinstaller.org/.

2. Click "Download".

3. Select the link for download based on your system configuration.

4. Confirm Ruby is installed.

How to install GITHUB desktop Client?

1. Go to https://desktop.github.com/.

2. Download GITHUB desktop Client.

3. Open the downloaded file.

4. Click Sign Into GitHub.com

5. Enter your username and password and login.

How to check Component Validity in Salesforce lightning?

If you navigate elsewhere in the UI while the asynchronous code is executing, the framework un renders and destroys the component that made the asynchronous request. You can still have a reference to that component, but it is no longer valid.

The cmp.isValid() call returns false for an invalid component.

If you call cmp.get() on an invalid component, cmp.get() returns null.

If you call cmp.set() on an invalid component, nothing happens and no error occurs. It’s essentially a no op.

In many scenarios, the cmp.isValid() call isn’t necessary because a null check on a value retrieved from cmp.get() is sufficient. The main reason to call cmp.isValid() is if you’re making multiple calls against the component and you want to avoid a null check for each result.

Lightning Data Service in Salesforce

Use Lightning Data Service to load, create, edit, or delete a record in your component without requiring Apex code. Lightning Data Service handles sharing rules and field-level security for you.

In addition to not needing Apex, Lightning Data Service improves performance and user interface consistency.

Check the below link




How to add Snap-Ins Chat component in Salesforce Community Cloud?

1. Go to Builder.

2. Select Snap-ins Chat under support section from Lightning Components.

Streamline Support for Customers with Community 360 (Pilot)

Help support agents decrease customer frustration, and improve support. Community 360 shows support agents working in the console whether customers have already looked at pertinent documentation and if they’ve already filed any cases before calling support. Agents don’t suggest articles customers have already accessed, or open duplicate cases. This feature is new in Lightning Experience.

To use Community 360, contact Salesforce to enroll in the public pilot program. Then you can enable it in the communities where you want to gather information and give the profile permissions to your support agent.

To enable it in the community, select Gather Community 360 data preference in the Administration workspace.

Lightning Voice

To turn on Voice check the below steps

1. Select Voice Settings.

2. Enable Voice.

Lightning Voice is available in Professional, Enterprise, Performance, and Unlimited Editions.

Voice is available for an additional cost as

Salesforce Summer ‘17 Release Overview

How to create Global Picklist Value Sets from existing pick list field?


Default Values formula in Picklist Fields


Session-Based Permission Sets


Posts in private and unlisted Chatter groups have a seen-by count that shows the number of people who have seen a post 

Re-assigning the approval request in Approval process is available in lightning experience

Lightning for Gmail: General Availability and Improved Efficiency 

Lightning for Gmail is now generally available, and with our latest features, your team gets a boost in productivity. And reps get to relate emails to Salesforce before sending them. Crafting emails is faster with the use of Lightning email templates.

Lightning Voice Is Now Lightning Dialer

For Lightning Voice Setup - http://www.infallibletechie.com/2017/07/lightning-voice.html

Relevant Activities with Smart Email Matching (Beta) with Einstein Automated Contacts


Streamline Support for Customers with Community 360 (Pilot)



Snap-In Chats lightning Component in Salesforce Community Cloud


Facebook Inbox Message Conversation 

Do more with Facebook in Social Studio. Show Facebook Inbox message conversation in Marketing Cloud in Salesforce.

Lightning Data Service


Embedded Login Enables Users to Log In to Your Website

Salesforce introduces the Embedded Login feature to authenticate your website’s visitors. Your web developers can add login capabilities to the website with just a few lines of HTML. Embedded Login connects your website with Salesforce. This feature works for communities created with either our Communities or Salesforce Identity products. This feature is new in both Lightning Experience and Salesforce Classic.

Earn your badge from Salesforce


Theme Layout Lightning Component for Community Cloud in Salesforce

Lightning Component:

<aura:component implements="forceCommunity:themeLayout" 
                description="Home Page Theme Layout">

    <aura:attribute name="search" type="Aura.Component[]" required="false"/>
    <aura:attribute name="profileMenu" type="Aura.Component[]" required="false"/>
    <aura:attribute name="navBar" type="Aura.Component[]" required="false"/>
    <aura:attribute name="logoComp" type="Aura.Component[]" required="false"/>
    <aura:attribute name="footer" type="Aura.Component[]" />
    <div class="slds">
        <div class="slds-grid slds-grid_vertical-align-center">
            <div class="slds-size_1-of-4">
            <div class="slds-size_3-of-4 slds-grid slds-wrap">
                <div class="slds-size_2-of-3">
                <div class="slds-size_1-of-3">
                <div class="slds-size_3-of-3">
        <div class="mainContentArea">
        <footer id="footer">


How to query users with Salesforce User License?

Using SOQL:

SELECT Id, Name FROM User WHERE Profile.UserLicense.Name = 'Salesforce'

Using Report:

1. Go to Setup --> Customize --> Users --> Fields --> Create New Field.

2. Select "Formula" as the data type and "Text" as return type.

3. Use "Profile.UserLicense.Name" in the formula editor.

4. Save the formula field.

5. Use the formula field in the report.

What is Salesforce Commerce Cloud?

Commerce Cloud is one of the eight product clouds that make up the Salesforce Intelligent Customer Success Platform.

With Commerce Cloud, retailers and brands can cater to their customers’ individual needs whether that’s online or in person. Commerce Cloud sites can be used across different devices and can personalize each shopper’s experience with dynamic content on web and mobile sites and smart product recommendations. If you shop online, you’ve probably used several Commerce Cloud sites without even knowing it!

Commerce Cloud features four core capabilities:

1. Commerce Cloud Digital
2. Commerce Cloud Store
3. Commerce Cloud Einstein
4. Commerce Cloud Order Management

Apex Settings in Salesforce

This is mainly used when we use Apex Metadata API.

Used to Deploy Metadata from Non-Certified Package Versions via Apex. By enabling this setting, ISVs can test managed packages that aren’t yet certified, and enterprises can use managed packages to test or update their apps. But as long as it’s turned off for your org, you can rest assured that no uncertified package can modify your org.

1. Go to Develop --> Apex Settings.

2. Enable Deploy Metadata from Non-Certified Package Versions via Apex and click "Save" button.

How to display wrapper class list in Salesforce Lightning component?

Lightning Component:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" controller="DPLightningHandler" >
    <aura:attribute name="listVehicles" type="WrapperClass.VehicleWrapper[]" />
    <ui:inputSelect aura:Id="makeId" multiple="false" label="Select Make">
        <ui:inputSelectOption label="Acura" text="acura"/>
        <ui:inputSelectOption label="Audi" text="Audi"/>
        <ui:inputSelectOption label="BMW" text="bmw"/>
        <ui:inputSelectOption label="Honda" text="honda"/>
        <ui:inputSelectOption label="Hyundai" text="hyundai"/>
        <ui:inputSelectOption label="Mercedes Benz" text="merc"/>
        <ui:inputSelectOption label="Nissan" text="nissan"/>
    <ui:button label="Find Vehicles" press="{!c.findVehicles}"/><br/><br/>
    <aura:renderIf isTrue="{!v.listVehicles.length > 0}">
        <aura:if isTrue="{!v.listVehicles.length > 0}">
            <table class="slds-table slds-table--bordered slds-table--cell-buffer slds-max-medium-table--stacked">
                        <th><h2>Vehicle Name</h2></th>
                        <th><h2>Vehicle Type</h2></th>
                        <th><h2>Make Id</h2></th>
                        <th><h2>Make Name</h2></th>
                    <aura:iteration items="{!v.listVehicles}" var="veh">
                            <td class="slds-truncate" data-label="Vehicle Name">{!veh.VehicleTypeName} </td>
                            <td class="slds-truncate" data-label="Vehicle Type">{!veh.VehicleTypeId}</td>
                            <td class="slds-truncate" data-label="Make Id">{!veh.MakeId}</td>
                            <td class="slds-truncate" data-label="Make Name">{!veh.MakeName}</td>                    

Lightning Controller:

findVehicles : function(component, event, helper) {
        var action = component.get("c.fetchInventory");
        vehicleMake : component.find("makeId").get("v.value")
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                component.set("v.listVehicles", response.getReturnValue());

Apex Lightning Controller:

public with sharing class DPLightningHandler {

    public static List < WrapperClass.VehicleWrapper > fetchInventory(String vehicleMake) {
        List < WrapperClass.VehicleWrapper > listVehicles = new List < WrapperClass.VehicleWrapper >();
        HTTPRequest req = new HTTPRequest();
        req.setEndPoint('https://vpic.nhtsa.dot.gov/api/vehicles/GetVehicleTypesForMake/' + vehicleMake + '?format=json');
        HTTP objHTTP = new HTTP();
        HTTPResponse res = objHTTP.send(req);
        system.debug('Response is ' + res.getBody());
        JSONParser parser = JSON.createParser(res.getBody());
        System.JSONToken token;
        String text;
        parser.nextToken(); // Eat first START_OBJECT {
        parser.nextToken(); // Eat token = FIELD_NAME; text = postalcodes
        parser.nextToken(); // Eat first START_ARRAY [
        parser.nextToken(); // Eat the first object's START_OBJECT {
        WrapperClass.VehicleWrapper obj;
        while ( ( token = parser.nextToken()) != null ) {
            if ( ( token = parser.getCurrentToken() ) != JSONToken.END_OBJECT ) {
                text = parser.getText();
                if ( token == JSONToken.FIELD_Name && text == 'MakeId' ) {
                    token = parser.nextToken();
                    obj = new WrapperClass.VehicleWrapper();
                    obj.MakeId = parser.getText();
                } else if (token == JSONToken.FIELD_Name && text == 'MakeName' ) {
                    token = parser.nextToken();
                    obj.MakeName = parser.getText();
                } else if ( token == JSONToken.FIELD_Name && text == 'VehicleTypeId' ) { 
                    token = parser.nextToken();
                    obj.VehicleTypeId = parser.getText();
                } else if ( token == JSONToken.FIELD_Name && text == 'VehicleTypeName' ) {
                    token = parser.nextToken();
                    obj.VehicleTypeName = parser.getText();
        system.debug('listVehicles are ' + listVehicles);
        return listVehicles;

Apex Wrapper Class:

public class WrapperClass {   
    public class VehicleWrapper {
        public String MakeId {get;set;}
        public String MakeName {get;set;}
        public String VehicleTypeId {get;set;}
        public String VehicleTypeName {get;set;}


How to create picklist in Lightning Component in Salesforce?

Lightning Component:

<aura:component access="global">
    <ui:inputSelect aura:Id="makeId" multiple="false" label="Select Make">
        <ui:inputSelectOption label="Acura" text="acura"/>
        <ui:inputSelectOption label="Audi" text="Audi"/>
        <ui:inputSelectOption label="BMW" text="bmw" value="true"/>
        <ui:inputSelectOption label="Honda" text="honda"/>
        <ui:inputSelectOption label="Hyundai" text="hyundai"/>
        <ui:inputSelectOption label="Mercedes Benz" text="merc"/>
        <ui:inputSelectOption label="Nissan" text="nissan"/>
    <ui:button label="Find Vehicles" press="{!c.findVehicles}"/>

here value="true" is used to set the default value.

Lightning Component Controller:

findVehicles : function(component, event, helper) {


When Find Vehicles button is clicked, selected value will be alerted on the screen.

Page Layout Preview As in Salesforce giving Insufficient Previliges

When you try Page Layout Preview As in Salesforce and get Insufficient Privileges, check the below things

1. Check whether your profile has CRUD permissions for the object.

2. For Delegated Administrators, add the Custom Object in Custom Object Administration section. Check this link for setting Custom Object Administration.


Picklist fields will show all the values since the record type is not taken into consideration.

PK Chunking in Salesforce

PK stands for Primary Key — the object’s record ID — which is always indexed. With this method, customers first query the target table to identify a number of chunks of records with sequential IDs. They then submit separate queries to extract the data in each chunk, and finally combine the results.

With the arrival of the Spring ’15 release, we’re pleased to announce that PK Chunking is a supported feature of the Salesforce Bulk API. Now you can get the performance benefits of PK Chunking without doing all the work of splitting the queries into manageable chunks. You can simply enter a few parameters on your Bulk API job, and the platform will automatically split the query into separate chunks, execute a query for each chunk and return the data.

Check the below link for more information


Performance Testing in Salesforce

Requesting Performance Tests
Before you can performance test in your sandbox environment, you must first create a test plan and submit it to salesforce.com Customer Support.

The test plan should include:

  • A description of your tests
  • Record counts of the objects in your tests
  • The test scripts and tool (e.g., LoadRunner) that your tests will use
  • Your estimated testing loads
  • When you plan to conduct the tests
  • Your sandbox organization’s and production organization’s IDs
  • Contact information that salesforce.com can use to reach you during your tests

Once salesforce.com Customer Support approves your test plan, salesforce.com can help monitor your tests. The performance test request should be submitted at least 2 weeks in advance.

Check the below link for more information


“could not acquire lock” error in Salesforce

When updating the role hierarchy or group membership through integration or the administration console, customers might occasionally receive a “could not acquire lock” error and have to repeat the operation. This error occurs because the sharing system locks the tables holding group membership information during updates to prevent incompatible simultaneous updates or timing issues, both of which could lead to inaccurate data about users’ access rights. Typically, these locks are held only very briefly, so most customers will never see a lock conflict error. In some scenarios—such as a change in role triggering a sharing rule recalculation—locks might be held for a longer time, and conflicts might occur.

Customers who experience these locking errors are typically executing large-scale data loads or integrations with other internal systems that are making changes to a role and group structure, user assignments to roles and groups, or both. When these processes are running—and an administrator tries to change a user’s role, or the customer tries to provision a new portal user—one of these simultaneous operations might be unable to secure the lock it requires. The most likely time for this failure to occur is during periodic organizational realignment events, such as end-of-year or end-of-quarter processing, where many account assignments and user roles are changing.

Customers can lessen the chance of locking errors by:

• Scheduling separate group maintenance processes carefully so they don’t overlap

• Implementing retry logic in integrations and other automated group maintenance processes to recover from a failure to acquire a lock

• Using the granular locking feature to allow some group maintenance operations to proceed simultaneously

Salesforce Interview Questions with Answers Part 43

1. Custom permissions in Salesforce


2. How Delegated Admin can set Field Level Security in Salesforce?


3. How to retrieve the Record Type which is accessible by user's Profile only? 


4. How to query all Validation Rules with object names in Salesforce?


5. History Tracking for Users records in Salesforce


6. Action Link Group Templates


7. Save Hierarchy Level option available objects in Salesforce reporting.

Sales, forecast, opportunity, and activity reports


8. Skinny Tables in Salesforce


9. Indexing in Salesforce


10. Two-Column Custom Indexes in Salesforce


11. Data Categories in Salesforce Knowledge


12. What are Trust notifications in Salesforce?


13. Permissions to Publish Articles.


14. What is the advantage of using JavaScript Remoting over apex:ActionFunction?

Use JavaScript remoting. Unlike the <apex:actionFunction> component, JavaScript Remoting does not require a form component. This technique doesn’t reduce the overall view state of a page, but your page generally performs better without the need to transmit, serialize, and deserialize the view state. The tradeoff is the loss of the re-render attribute and the additional JavaScript code to handle callbacks.

15. “could not acquire lock” error in Salesforce


16. What happens to files related to a lead after converting it?

Files will be in the related list of Account, Person Account(if used), Contact and Opportunity.

You do not have permission to publish articles of the associated article type Salesforce

If you face "You do not have permission to publish articles of the associated article type" in Salesforce", check the below steps.

1. Make sure the article is not locked(pending approval). Lock symbol near the article title shows whether the article is locked for approval.

2. Check the user's profile and permission set. Make sure the user has permission to Create, Read, Edit and Delete access to the article type.

3. Check whether the user has Manage Article permission.

4. Check whether the user record has Knowledge User checkbox enabled.

Salesforce Ownership Skew

Salesforce customers who manage large data volume in their orgs must architect record ownership carefully to ensure peak performance. When you have a large number of records owned by a single user in Salesforce, we call that an “ownership skew”.

One of the common patterns involves customers concentrating ownership of data so that a single user or queue, or all the members of a single role or public group, owns most or all of the records for a particular object.

If the user(s) must have a role in sharing data, we recommend that you:

1. Place them in a separate role at the top of the hierarchy
2. Not move them out of that top-level role
3. Keep them out of public groups that could be used as the source for sharing rules

Check the below link for more info