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

https://help.salesforce.com/articleView?id=000175929&type=1

Cheers!!!

Suggested Articles in Salesforce

1. Go to Support Settings


2. Enable Suggested Articles.


Output:


Cheers!!!

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 enable this, contact Salesforce Customer Support.

Check the below link for more info

https://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_forcecom_data_pipelines.htm

Cheers!!!

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.


Cheers!!!

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.

Cheers!!!

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.

Cheers!!!

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

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service.htm

Cheers!!!

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.


Cheers!!!

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.



Cheers!!!

Lightning Voice

To turn on Voice check the below steps

1. Select Voice Settings.

2. Enable Voice.

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

Note:
Voice is available for an additional cost as

Cheers!!!

Salesforce Summer ‘17 Release Overview

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

http://www.infallibletechie.com/2017/08/how-to-create-global-picklist-value.html

Default Values formula in Picklist Fields

http://www.infallibletechie.com/2017/08/default-values-formula-in-picklist.html

Session-Based Permission Sets

http://www.infallibletechie.com/2017/08/session-based-permission-sets-in.html

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

https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/adc_overview.htm

Streamline Support for Customers with Community 360 (Pilot)

http://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/rn_community_360.htm

http://www.infallibletechie.com/2017/07/streamline-support-for-customers-with.html

Snap-In Chats lightning Component in Salesforce Community Cloud

http://www.infallibletechie.com/2017/07/how-to-add-snap-ins-chat-component-in.html

Facebook Inbox Message Conversation 

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

Lightning Data Service

http://www.infallibletechie.com/2017/07/lightning-data-service-in-salesforce.html

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

https://trailhead.salesforce.com/modules/summer_17/units/summer_17_sales

Cheers!!!

Theme Layout Lightning Component for Community Cloud in Salesforce

Lightning Component:

<aura:component implements="forceCommunity:themeLayout" 
                access="global" 
                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">
                {!v.logoComp}
            </div>
            <div class="slds-size_3-of-4 slds-grid slds-wrap">
                <div class="slds-size_2-of-3">
                {!v.navBar}
                </div>
                <div class="slds-size_1-of-3">
                {!v.profileMenu}
                </div>
                <div class="slds-size_3-of-3">
                {!v.search}
                </div>
            </div>
        </div>
        <div class="mainContentArea">
            {!v.body}
        </div>
        <footer id="footer">
            {!v.footer}
        </footer>
    </div>
</aura:component>

Output:


Cheers!!!

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.

Cheers!!!

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

Cheers!!!

Apex Settings in Salesforce

Used to Deploy Metadata from Non-Certified Package Versions via Apex.

1. Go to Develop --> Apex Settings.


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


Cheers!!!

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:inputSelect><br/><br/>
    <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">
                <thead>
                    <tr>
                        <th><h2>Vehicle Name</h2></th>
                        <th><h2>Vehicle Type</h2></th>
                        <th><h2>Make Id</h2></th>
                        <th><h2>Make Name</h2></th>
                    </tr>
                </thead>
                <tbody> 
                    <aura:iteration items="{!v.listVehicles}" var="veh">
                        <tr>
                            <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>                    
                        </tr>
                    </aura:iteration>
                </tbody>
            </table> 
        </aura:if>
    </aura:renderIf>
</aura:component>

Lightning Controller:

({
findVehicles : function(component, event, helper) {
        var action = component.get("c.fetchInventory");
        action.setParams({
        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());
            }
        });
        $A.enqueueAction(action);
}
})

Apex Lightning Controller:

public with sharing class DPLightningHandler {

    @AuraEnabled
    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');
        req.setMethod('GET');
        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();
                    listVehicles.add(obj);
                } 
            } 
        }
        system.debug('listVehicles are ' + listVehicles);
        return listVehicles;
    }
    
}

Apex Wrapper Class:

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

Output:


Cheers!!!

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:inputSelect><br/><br/>
    <ui:button label="Find Vehicles" press="{!c.findVehicles}"/>
</aura:component>

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

Lightning Component Controller:

({
findVehicles : function(component, event, helper) {
        alert(component.find("makeId").get("v.value"));
}
})

Output:


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

Cheers!!!

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.

http://www.infallibletechie.com/2017/06/how-delegated-admin-can-set-field-level.html

Note:
Pick list fields will show all the values since the record type is not taken into consideration.

Cheers!!!

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

https://developer.salesforce.com/blogs/engineering/2015/03/use-pk-chunking-extract-large-data-sets-salesforce.html

Cheers!!!

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

https://developer.salesforce.com/blogs/engineering/2013/09/performance-testing-force-com-application.html

Cheers!!!

“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

Cheers!!!

Salesforce Interview Questions with Answers Part 43

1. Custom permissions in Salesforce

http://www.infallibletechie.com/2017/06/custom-permissions-in-salesforce.html

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

http://www.infallibletechie.com/2017/06/how-delegated-admin-can-set-field-level.html

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

http://www.infallibletechie.com/2017/05/how-to-retrieve-record-type-which-are.html

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

http://www.infallibletechie.com/2017/05/how-to-query-all-validation-rules-with.html

5. History Tracking for Users records in Salesforce

http://www.infallibletechie.com/2017/05/history-tracking-for-users-records-in.html

6. Action Link Group Templates

http://www.infallibletechie.com/2017/06/action-link-group-templates.html

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

Sales, forecast, opportunity, and activity reports

https://help.salesforce.com/articleView?id=reports_saving.htm&language=en_US&type=0

8. Skinny Tables in Salesforce

http://www.infallibletechie.com/2017/06/skinny-tables-in-salesforce.html

9. Indexing in Salesforce

http://www.infallibletechie.com/2017/06/indexing-in-salesforce.html

10. Two-Column Custom Indexes in Salesforce

http://www.infallibletechie.com/2017/06/two-column-custom-indexes-in-salesforce.html

11. Data Categories in Salesforce Knowledge

http://www.infallibletechie.com/2015/06/data-categories-in-salesforce-knowledge.html

12. What are Trust notifications in Salesforce?

http://www.infallibletechie.com/2017/06/what-are-trust-notifications-in.html

13. Permissions to Publish Articles.

http://www.infallibletechie.com/2017/07/you-do-not-have-permission-to-publish.html

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

http://www.infallibletechie.com/2017/07/could-not-acquire-lock-error-in.html

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.

Cheers!!!

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 have 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 check box enabled.

Cheers!!!

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

https://developer.salesforce.com/blogs/engineering/2012/06/architect-salesforce-record-ownership-skew-for-peak-performance-in-large-data-volume-environments.html

Cheers!!!