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

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"/>
        <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>

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!!!

What are Trust Notifications in Salesforce?

Trust Notifications are near real-time email notifications regarding incidents and maintenances posted to our Trust status site, https://status.salesforce.com. Anyone can self-subscribe to Trust Notifications and tailor their subscription settings to the instances and types of events of which they want to be notified. Trust Notifications are sent from alerts@mail.salesforce.com.

1. Go to https://status.salesforce.com/status.

2. Select the instance you want to subscribe.

3. Click SUBSCRIBE button.


4. Enter your email address to subscribe.

Note:
We can update the notifications at any time.

Cheers!!!

What is Defer Sharing Calculation in Salesforce?

Defer Sharing Calculation lets an administrator suspend and resume sharing calculations. This permission affects group membership calculation and sharing rule calculation. Performing a large number of configuration changes can lead to very long sharing rule evaluations or time outs. To avoid these issues, an administrator can suspend these calculations and resume calculations during an organization's maintenance period.

The Defer Sharing Calculation permission is not enabled by default. To enable Defer Sharing Calculation, please contact Salesforce.

Administrators should plan to suspend/resume sharing calculations during maintenance windows to have minimal impact on users.

For example, you make large number of changes to criteria based sharing rules to allow access to specific groups and territories. Since sharing rule calculation is enabled by default, those sharing rule changes are evaluated immediately and can take a very long time to process and cause your organization to time out.

With Defer Sharing Calculation you can avoid this by suspending sharing rule calculations from evaluating immediately after you make sharing rule changes. You can resume sharing rule calculations during maintenance windows to have minimal impact on users.

Check the below link for more information

https://resources.docs.salesforce.com/200/10/en-us/sfdc/pdf/salesforce_defer_sharing_tipsheet.pdf

Cheers!!!

Two-Column Custom Indexes in Salesforce

Two-column custom indexes are a specialized feature of the Salesforce platform. They are useful for list views and situations where you want to use one field to select records to display and another field to sort them. For example, an Account list view that selects by State and sorts by City can use a two-column index with State in the first column and City in the second.

When a combination of two fields is a common filter in the query string, two-column indexes typically help you sort and display records.

For example, for the following SOQL, which appears in pseudo code, a two-column index on f1__c,f2__c is more efficient than single indexes on f1__c and f2__c.

SELECT Name
FROM Account
WHERE f1__c = 'foo'
AND f2__c = 'bar'

Note: 
Two-column indexes are subject to the same restrictions as single-column indexes, with one exception. Two-column indexes can have nulls in the second column by default, wher

Cheers!!!

Indexing in Salesforce

Salesforce supports custom indexes to speed up queries, and you can create custom indexes by contacting Salesforce Customer Support.

Note: The custom indexes that Salesforce Customer Support creates in your production environment are copied to all sandboxes that you create from that production environment.

The platform maintains indexes on the following fields for most objects.
• RecordTypeId
• Division
• CreatedDate
• Systemmodstamp (LastModifiedDate)
• Name
• Email (for contacts and leads)
• Foreign key relationships (lookups and master-detail)
• The unique Salesforce record ID, which is the primary key for each object

Salesforce also supports custom indexes on custom fields, except for multi-select picklists, text areas (long), text areas (rich), non-deterministic formula fields, and encrypted text fields.

External IDs cause an index to be created on that field, which is then considered by the Force.com query optimizer.

You can create External IDs only on the following fields.
• Auto Number
• Email
• Number
• Text

To create custom indexes for other field types, including standard fields, contact Salesforce Customer Support.

By default, the index tables do not include records that are null (records with empty values). You can work with Salesforce Customer Support to create custom indexes that include null rows. Even if you already have custom indexes on your custom fields, you must explicitly enable and rebuild them to get the empty-value rows indexed.

Cheers!!!

Skinny Tables in Salesforce

Salesforce creates skinny tables to contain frequently used fields and to avoid joins, and it keeps the skinny tables in sync with their source tables when the source tables are modified. To enable skinny tables, contact Salesforce Customer Support.

For each object table, Salesforce maintains other, separate tables at the database level for standard and custom fields. This separation ordinarily necessitates a join when a query contains both kinds of fields. A skinny table contains both kinds of fields and does not include
soft-deleted records.

Skinny tables are most useful with tables containing millions of records. They can be created on custom objects, and on Account, Contact, Opportunity, Lead, and Case objects. In addition, they can enhance performance for reports, list views, and SOQL.

Skinny tables can contain the following types of fields.

• Checkbox
• Date
• Date and time
• Email
• Number
• Percent
• Phone picklist
• Picklist (multi-select)
• Text
• Text area
• Text area (long)
• URL

Considerations
• Skinny tables can contain a maximum of 100 columns.
• Skinny tables cannot contain fields from other objects.
• For Full sandboxes: Skinny tables are copied to your Full sandbox organizations, as of the Summer '15 release. Previously, they were not.

For other types of sandboxes: Skinny tables are still not copied to your sandbox organizations. To have production skinny tables activated for sandbox types other than Full sandboxes, contact Salesforce Customer Support.

Cheers!!!

Cross Filter Work around in Salesforce Joined Report

Salesforce currently doesn't support cross filter in Joined Report.



Check the below article for work aroud.

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

Vote the below Salesfore idea and keep monitoring.

https://success.salesforce.com/ideaView?id=08730000000gMcIAAU

Cheers!!!

How to show Joined Report Results for Records matching on both Sides

Currently Salesforce joined report doesn't support showing Joined Report Results for Records matching on both Sides.

Vote the below Idea on Salesforce and keep monitoring.

https://success.salesforce.com/ideaView?id=08730000000hnQAAAY

Cheers!!!

Platform Events in Salesforce

Use platform events to define the data to be delivered in custom notifications.

1. Go to Platform Events.


2. Click New Platform Event.


3. Save Platform Event.


4. Create fields as below.


Sample Trigger:

trigger OrderEventTrigger on Order_Event__e (after insert) {   
    List < Task > listTasks = new List < Task >();
    for (Order_Event__e event : Trigger.New) {
        if (event.Has_Shipped__c == true) {
            // Create Case to dispatch new team.
            Task tsk = new Task();
            tsk.Status = 'New';
            tsk.Priority = 'Medium';
            tsk.Subject = 'Follow up on shipped order ' + 
                event.Order_Number__c;
            tsk.OwnerId = UserInfo.getUserId();
            listTasks.add(tsk);
        }
   }
    insert listTasks;
}

OrderEventTrigger is subscribed to Order Event. If Order Event record is created with Has Shipped equal to create, it will create a task as per the trigger.

Cheers!!!

Action Link Group Templates

Use action link group templates to instantiate action link groups with common properties.

An action link is a button on a feed element that targets an API, a Web page, or a file. Use action links to integrate Salesforce and third-party systems into the feed. Every action link belongs to an action link group and action links within the group are mutually exclusive.


Cheers!!!

Salesforce Interview Questions with Answers Part 42

1. How to include external javascript file in lightning component?

You can use a RequireJS component or Loader component to load external JS or CSS files.

2. How to debug lightning component controllers in Salesforce?

https://developer.salesforce.com/blogs/developer-relations/2015/03/debugging-lightning-components.html

3. Is it possible to use other frameworks like AngularJs or KendoUI with lightning components ?

Yes

4. Is Lightning an MVC framework ?

No. It’s a component-based framework.

5. Which parts of Lightning Components are server-side and which are client-side ?

Lightning Components use JavaScript on the client side and Apex on the server side.

6. What is the use of the aura:method tag in Lightning ?

We can Use < aura:method > to define a method as part of a component’s API. This enables us to directly call a method in a component’s client-side controller instead of firing and handling a component event. Using simplifies the code needed for a parent component to call a method on a child component that it contains.

http://www.infallibletechie.com/2016/11/auramethod-in-salesforce.html

7. Can we Include One component to another ?

Yes, we can Include one lightning component to another lightning component.

8. How can we  deploy components to production org ?

We can deploy component by using managed packages, Force.com IDE, Force.com Migration Tool or Change Sets.

9. Difference between REST API and SOAP API?

Varies on records that can be handled. Generally if we want to access less number of records we go for REST API.

10. What is the maximum allowed time limit while making a callout to external service in apex?

Maximum of 120 second time limit is enforced while making callout to external service.

11. What is the default timeout period while calling webservice from Apex.

10 sec.

12. Community User Visibility in Salesforce

http://www.infallibletechie.com/2017/04/community-user-visibility-in-salesforce.html

13. What is the use of Sharing Set in Salesforce Community?

http://www.infallibletechie.com/2016/09/what-is-use-of-sharing-set-in.html

Cheers!!!

Custom permissions in Salesforce

Custom permissions let you define access checks that can be assigned to users via permission sets or profiles, similar to how you assign user permissions and other access settings. For example, you can define access checks in Apex that make a button on a Visualforce page available only if a user has the appropriate custom permission.

1. Create a Custom Permission.


2. Assign it to your profile.


3. Use the sample code.

Visualforce Page:

<apex:page controller="Sample">
    Checking Custom Permission in Visualforce page - {!$Permission.Create_Account}
    <br/><br/>
    Checking Custom Permission from Apex Class - {!accessBool }
</apex:page>

Apex Controller:

public with sharing class Sample { 
    
    public Boolean accessBool {get;set;}
    
    public Sample() {
        accessBool = checkUserHasCustomPermissionAccess('Create_Account', UserInfo.getUserId());
    }
    
    public static Boolean checkUserHasCustomPermissionAccess(String permissionName, Id userId) {
        Set < Id > permissionSetIds = new Set < Id >();
        List < User > userList = new List < User >();
        for ( SetupEntityAccess access : [ SELECT ParentId FROM SetupEntityAccess 
                                           WHERE SetupEntityId IN ( SELECT Id 
                                                                    FROM CustomPermission 
                                                                    WHERE DeveloperName = :permissionName )
        ]) 
            permissionSetIds.add(access.ParentId);
        userList = [ SELECT Username FROM User WHERE Id IN (
                SELECT AssigneeId FROM PermissionSetAssignment
                WHERE PermissionSetId IN :permissionSetIds AND AssigneeId =: userId ) ];
        return userList.isEmpty() ? false : true;
    }
    
}

Output:


Cheers!!!

How to get picklist values based on record type in Visualforce page?

Visualforce page:

<apex:page controller="Sample">
    <apex:form >
        <apex:inputField value="{!objEmp.Approval_Status__c}"/>
        <br/><br/><br/>
        <apex:inputField value="{!objEmp1.Approval_Status__c}"/>
    </apex:form>
</apex:page>

Apex Class:

public with sharing class Sample { 
    
    public Employee__c objEmp {get;set;}
    public Employee__c objEmp1 {get;set;}
    
    public Sample() {
        objEmp1 = new Employee__c(RecordTypeId = '0120P000000EDfb');
        objEmp = new Employee__c(RecordTypeId = '0120P000000EDfg');
    }
    
}

Output:

Record Type which has one value


Record Type which has multiple values


Cheers!!!

System and User Date and Date Time in Salesforce

Sample Code:

system.debug('System Date - ' + System.now().dateGMT() + ' Or ' + DateTime.now().dateGMT());
system.debug('User Locale Date - ' + Date.today() + ' Or ' + System.today());
system.debug('System Date Time - ' + System.now() + ' Or ' + DateTime.now());

system.debug('User Locale Date Time - ' + DateTime.now().format() + ' Or ' + System.now().format());

Output:


Cheers!!!

Service not found at: /lapi/record-ui/ salesforce

Check the URL in the request to fix this issue.

Sample Successful Request:


Cheers!!!

How to retrieve the Record Type which are accessible by user's Profile only?

Sample Code:

         List < SelectOption > listRecTypes = new List < SelectOption >();
        for ( RecordTypeInfo info: Opportunity.SObjectType.getDescribe().getRecordTypeInfos() ) {
            if(info.isAvailable()) {
                listRecTypes.add(new SelectOption(info.getRecordTypeId(), info.getName()));
            }
        }

The above code will add only the record type accessible to the user.

Cheers!!!

How to merge all your badges from different account to one account in Salesforce Trailhead?

To merge all your badges from different account to one account in Salesforce Trailhead, check the below link

https://force.desk.com/customer/portal/articles/2418878-merging-trailhead-accounts?b_id=13478

Note:
Make sure you have the usernames of the accounts which are to be merged.

Cheers!!!

History Tracking for Users records in Salesforce

User History related list is not available in Salesforce as of now.

You can use Feed Tracking temporarily - http://www.infallibletechie.com/2013/10/feed-tracking-in-salesforce.html.

If users Role, Profile, Active checkbox, and email are changed, you can track the changes from Audit History - http://www.infallibletechie.com/2012/04/setup-audit-trail.html.

Keep watching the below Salesforce Idea

https://success.salesforce.com/ideaView?id=08730000000BqrvAAC

Cheers!!!

How to remove Unresolved emails from My Tasks in Home page in Salesforce?

1. Go to Email to Salesforce.


2. Disable Email to Salesforce.


Cheers!!!

Difference between CRUD, FLS and Sharing in Salesforce

CRUD limits which tabs (or objects) a user can access.

FLS limits which columns (or fields on an object) a user can access.

Sharing limits which rows (or object records) a user can access.

Default Sharing Settings


Check the below link for more info

https://trailhead.salesforce.com/en/modules/data_security

Cheers!!!

How to find Duplicates in Salesforce Lightning Experience


Cheers!!!

The authentication provider didn't provide a refresh token. If the access token expires, your org won't be able to access this named credential.

If you face the below issue in Named Credential, make sure Default Scope is set in Auth. Provider.

"The authentication provider didn't provide a refresh token. If the access token expires, your org won't be able to access this named credential."


Cheers!!!

My journey to Salesforce Certified Platform Developer II certification exam

The Salesforce Certified Platform Developer II program is designed for individuals who would like to demonstrate their skills and knowledge in advanced programmatic capabilities of the Force.com platform and data modeling to develop complex business logic and interfaces. The candidate can design, develop, test, and deploy programmatic solutions that are maintainable and re-usable and follow design patterns and object-oriented programming best practices.

It has the below three levels to get certified from Salesforce.

Level 1 - Multi Choice Questions (60 questions)

This exam is prerequisite for the Programming Assignment and Essay exams. Passing Score is 63% i.e. you must answer at least 40 questions correctly out of 60 questions. Time allotted to complete the exam is 120 minutes.

Tips for the level1 exam.

1. Apex Development
2. Visual Force Development
3. Test Class best practices
4. Apex Trigger best practices
5. SOQL and SOSL
6. Order of execution in both VF and Apex
7. Governor Limits
8. Exception Handling
9. Do the Mock Test given on Bulkified.com - http://bulkified.com/Certifications/?certificationId=4

Level 2 - Programming Assignment

Register for this exam only when you are ready. Do not register if you are going to be busy during the exam schedule. We get 30 days to complete the assignment. Spend at least 4 hours each day.

Check the Programming Assignment schedule date here - http://certification.salesforce.com/programmingassignment.

The Salesforce Certification Programming Assignment asks each candidate to develop a working application using the capabilities of the Force.com platform. Each application should meet the identified business and technical requirements outlined in this document.

The final application should be developed in a Force.com sandbox and deployed to the production organization provided. Candidates should consider this application to be a working prototype, rather than a market-ready application. To minimize development time, the requirements are intentionally limited in scope.

Below are the important things to be considered while developing the application.

1. Make sure the code uses DML and SOQL efficiently.
2. The solution should consider data access and visibility.
3. Code should catch all possible errors/exceptions in the controller.
4. Code readability should be excellent.
5. Visualforce page should display user-friendly error messages.
6. The test class should assert application behavior in all cases.
7. Make sure governor limits are considered.
8. Try 100% code coverage.
9. Test class should consider large data volumes.
10. Use proper comments in the code.
11. Use proper indentation in the code.
12. Do all the development in the Sandbox.
13. Load multiple dummy records with proper values in both Sandbox and Production. Use data loader to load bulk data.
14. Bulkify the trigger.
15. User Test Utility class for test data.
16. Use trigger handlers for triggers.
17. Use proper naming for variables, triggers, pages and other components.

Note:
Start the application development on the Day 1 of the assignment receival. Do not wait for the last week. Trust me, this is not an easy exam.

Level 3 - Essay Exam

Essay exam is purely based on the assignment work. Do not miss the due date for Essay Exam. Essay exam should be completed within the 30 days of programming assignment. So, schedule it accordingly. Do not wait for the last week to schedule the exam. You may not get the pro-metric center appointment if you schedule it at the last moment.

In the essay exam, talk about the below things.

1. How have you designed the application?
2. What are all the best practices applied? Best practices for development, data load, and test classes.
3. Deployment plan.
4. Testing plan.

The wait for results can vary, but typically you can expect to wait around 4-8 weeks to find out. Salesforce gives us a report with our strengths and areas for improvement with detailed explanation.

Links for references:

https://www.salesforce.com/campaigns/success-services/advanced-force-developer-certification.jsp

https://developer.salesforce.com/page/Certification

https://developer.salesforce.com/page/The_Path_to_Advanced_Developer_Certification 

Cheers!!!

Rate Rules in Salesforce Community

Create and modify rate rules to monitor and limit how frequently member-generated content is created in your community. Rate rules protect your community against spammers and bots that attack your community by posting the same message multiple times in a row. You can create rate rules to notify your moderators of suspicious spammer-like behavior or freeze a member on the spot.

1. Select Moderation.


2. Click Rules tab.


Cheers!!!

Language Picker in Salesforce Community


Cheers!!!