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.

We can update the notifications at any time.

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


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.

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

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.

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.

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)

• 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.

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.


Vote the below Salesfore idea and keep monitoring.


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.


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 ' + 
            tsk.OwnerId = UserInfo.getUserId();


    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.

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.

Salesforce Interview Questions with Answers Part 42

1. How to include external javascript files in the 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?


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


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.


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 components 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?

A maximum of 120 seconds time limit is enforced while making a callout to external service.

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

10 sec.

12. Community User Visibility in Salesforce


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


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}
    Checking Custom Permission from Apex Class - {!accessBool }

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 )
        userList = [ SELECT Username FROM User WHERE Id IN (
                SELECT AssigneeId FROM PermissionSetAssignment
                WHERE PermissionSetId IN :permissionSetIds AND AssigneeId =: userId ) ];
        return userList.isEmpty() ? false : true;