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

http://www.infallibletechie.com/2013/09/connected-apps-in-salesforce.html

How to get Access Token from Salesforce?

To get Access Token from Salesforce

URL - https://test.salesforce.com/services/oauth2/token or https://domain.my.salesforce.com/services/oauth2/token

Method - POST

Parameters:

username
password
client_id
client_secret
grant_type=password

To get client_id and client_secret, use the below link

http://www.infallibletechie.com/2018/05/how-to-create-connected-apps-in.html

From POSTMAN Client in Google Chrome


From SOAPUI

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

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.
Integer
Long
sObject
String
Enum

Sample Code:

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

}

Create New Sub Folder in Salesforce Reports and Dashboards

http://www.infallibletechie.com/2018/06/how-to-create-new-sub-folder-in.html

lightning:recordForm
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

http://www.infallibletechie.com/2018/06/moving-reports-and-dashboards-to.html

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

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_considerations.htm?search_text=dml

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

https://help.spinify.com/integrations/integrate-with-salesforce/salesforce-app-setup

Onboarding & Assistance for Lightning Experience in Salesforce

Encourage Users to Work in Lightning Experience.

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="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account</members>
        <members>AccountContactRole</members>
        <members>Activity</members>
        <members>Asset</members>
        <members>AssistantProgress</members>
        <members>Campaign</members>
        <members>CampaignMember</members>
        <members>Case</members>
        <members>CaseContactRole</members>
        <members>CaseMilestone</members>
        <members>Contact</members>
        <members>ContentVersion</members>
        <members>Contract</members>
        <members>ContractContactRole</members>
        <members>ContractLineItem</members>
        <members>DuplicateRecordItem</members>
        <members>DuplicateRecordSet</members>
        <members>Entitlement</members>
        <members>EntitlementContact</members>
        <members>Event</members>
        <members>FeedItem</members>
        <members>ForecastingAdjustment</members>
        <members>ForecastingCategoryMapping</members>
        <members>ForecastingOwnerAdjustment</members>
        <members>ForecastingQuota</members>
        <members>ForecastingTypeToCategory</members>
        <members>Idea</members>
        <members>Lead</members>
        <members>LiveAgentSession</members>
        <members>LiveChatTranscript</members>
        <members>LiveChatTranscriptEvent</members>
        <members>LiveChatTranscriptSkill</members>
        <members>LiveChatVisitor</members>
        <members>Macro</members>
        <members>MacroAction</members>
        <members>MacroInstruction</members>
        <members>Opportunity</members>
        <members>OpportunityCompetitor</members>
        <members>OpportunityContactRole</members>
        <members>OpportunityLineItem</members>
        <members>PartnerRole</members>
        <members>Pricebook2</members>
        <members>PricebookEntry</members>
        <members>Product2</members>
        <members>Question</members>
        <members>QuickText</members>
        <members>Quote</members>
        <members>QuoteLineItem</members>
        <members>Reply</members>
        <members>ServiceContract</members>
        <members>Site</members>
        <members>SocialPersona</members>
        <members>Solution</members>
        <members>StreamingChannel</members>
        <members>Task</members>
        <members>Territory2</members>
        <members>Territory2Model</members>
        <members>User</members>
        <members>UserProvisioningRequest</members>
        <members>UserTerritory2Association</members>
        <members>WorkBadge</members>
        <members>WorkBadgeDefinition</members>
        <members>WorkThanks</members>
        <members>*</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>*</members>
        <name>CustomObjectTranslation</name>
    </types>
    <version>36.0</version>
</Package>


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()

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.

component.find()

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.

SOQL:

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:



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:

Component:

<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}"/>
    </div>
    
</aura:component>

Controller:

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

Output:


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.


How to handle trigger/validation error in Lightning Components?

Sample Code:

Sample.cmp:

<aura:component implements="force:appHostable"
                controller="Sample">
    
    <div class="slds-box slds-theme_default">
        <lightning:button variant="brand" label="Click It" onclick="{!c.clickIt}"/>
    </div>
    
</aura:component>

SampleController.js:

({
    clickIt : function(component, event, helper) {
        var action = component.get("c.createContact");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                alert("Contact Created successfully");
            } else if (state === "ERROR") {
                alert(response.getError()[0].message);
            } else if (state === "INCOMPLETE") {
                alert("No response from server or client is offline.");
            }
        });
        $A.enqueueAction(action);        
    }
})

Sample Apex Class:

public class Sample {

    @auraEnabled
    public static void createContact() {
        try {            
            Contact con = new Contact(FirstName = 'Test');
            insert con;
        }
        catch (Exception e) {
            throw new AuraHandledException('Something went wrong: ' + e.getMessage() + '. Contact Your Administrator');    
        }
        finally {
            
        }        
    }
    
}

Output: