Group Engagement in Salesforce

View group member engagement in a convenient report linked from each group. See the number of members, posts, comments, likes, questions, and answered questions in a single view for each group. This feature is available in Salesforce Classic only.

Anyone with permissions can view the group engagement report. Group owners, managers, and other users with permissions (for example, users with the “Modify All Data” and “Manage Unlisted Groups”) can quickly access this report by clicking Show Group Report below the group photo.

Check the below link for more information

Global Constant In Process Builder in Salesforce

Choose a global constant to set a value to null or an empty string. For example, choose $GlobalConstant.Null.

Two global constants are

1. $GlobalConstant.Null
2. $GlobalConstant.EmptyString

Scenarios for Process Builders:

1. While using update action in Process builder for Contact records and then if we want to clear Account field, then we can use $GlobalConstant.Null. We cannot use $GlobalConstant.EmptyString since the lookup field cannot be mapped to blank string.

2. While using insert or update action in Process builder and if we would like to update any field with blank value, then we can use $GlobalConstant.EmptyString.

Difference between IsBlank and IsNull -

Sample Partial DML Apex code in Salesforce

Sample Code:

List < Contact > conList = new List < Contact > {
new Contact(FirstName = 'Test0', LastName = 'Test0', Department = 'Finance'),
new Contact(FirstName = 'Test1', LastName = 'Test1', Department = 'Technology'),
new Contact(FirstName = 'Test2', LastName = 'Test2', Department = 'Finance'),
new Contact()

Database.SaveResult[] srList = Database.insert(conList, false);

for (Database.SaveResult sr : srList) {
if ( sr.isSuccess() ) {
// Develop code for sucessfully inserted contacts
System.debug('Successfully inserted contact. Contact ID: ' + sr.getId());
} else {
for ( Database.Error err : sr.getErrors() ) {
// Develop code for failed contacts
System.debug(err.getStatusCode() + ' : ' + err.getMessage() + ' : ' + err.getFields());

Simple Inbound REST API using Apex in Salesforce

Sample Code:

global with sharing class sampleRest {
    global static Account doGet() {
        RestRequest req = RestContext.request;
        String memberId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
        Account result = [SELECT Id, Name FROM Account WHERE Id = :memberId];
        return result;
    global static String doPost(String name, String descrp) {
        Account a = new Account(Name = name, Description = descrp);        
        insert a;
        return a.Id;

    global static void doDelete() {
        RestRequest req = RestContext.request;
        String memberId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
        Account memb = [SELECT Id FROM Account WHERE Id = :memberId];
        delete memb;

To test in POSTMAN Client extension, check the below

1. Create a Connected App.

2. Create Auth. Provider.

3. Get the access_token first try GET, POST and DELETE.




To test in Workbench, check the below




Simple Outbound REST API with XML Response using Apex in Salesforce

Remote Site Settings:

Visualforce Page:

<apex:page controller="RESTAPIXMLResponseController">
                <apex:pageBlockSectionItem>Customer No: <apex:inputText value="{!strCustomerNo}"/></apex:pageBlockSectionItem>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Fetch" action="{!fetchAPI}"/>
            <apex:repeat value="{!mapCustomer}" var="c">
                {!c} - {!mapCustomer[c]}<br/>                 

Apex Class:

public with sharing class RESTAPIXMLResponseController {

    public String strCustomerNo {get;set;}
    public Map < String, String > mapCustomer {get;set;}
    public RESTAPIXMLResponseController() {
    public void fetchAPI() {
        mapCustomer = new Map < String, String >();
        String endpoint = '' + strCustomerNo + '/';
        HTTP h = new HTTP();
        HTTPRequest req = new HTTPRequest();
        HTTPResponse res = h.send(req);
        Dom.Document doc = res.getBodyDocument();
        Dom.XMLNode customer = doc.getRootElement();
        for ( Dom.XMLNode child : customer.getChildElements() ) 
            mapCustomer.put(child.getName(), child.getText());


Simple Outbound REST API with JSON Response using Apex in Salesforce

Remote Site Settings:

Visualforce Page:

<apex:page controller="RESTAPIJSONResponseController">
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Fetch" action="{!fetchAPI}"/>
                <apex:pageBlockTable value="{!listWrapper}" var="obj">
                    <apex:column value="{!}" headerValue="Id"/>
                    <apex:column value="{!obj.login}" headerValue="Login"/>
                    <apex:column value="{!obj.url}" headerValue="URL"/>
                    <apex:column value="{!obj.description}" headerValue="Description"/>

Apex Class:

public with sharing class RESTAPIJSONResponseController {

    public List < JSONWrapper > listWrapper {get;set;}
    public RESTAPIJSONResponseController() {
        listWrapper = new List < JSONWrapper >();
    public void fetchAPI() {
        HTTP h = new HTTP();
        HTTPRequest req = new HTTPRequest();
        HTTPResponse res = h.send(req);  
        JSONParser parser = JSON.createParser(res.getBody());
        listWrapper = (List < JSONWrapper >) JSON.deSerialize(res.getBody(), List < JSONWrapper >.class);
           If the response contains only one value instead list, then you can use the below code
           JSONWrapper obj = (JSONWrapper) JSON.deSerialize(res.getBody(), JSONWrapper.class); 
    public class JSONWrapper {
        public String login {get;set;}
        public String id {get;set;}
        public String url {get;set;}
        public String repos_url {get;set;}
        public String events_url {get;set;}
        public String hooks_url {get;set;}
        public String issues_url {get;set;}
        public String members_url {get;set;}
        public String public_members_url {get;set;}
        public String avatar_url {get;set;}
        public String description {get;set;}


How to download and setup Oxygen Eclipse for IDE?

1. Go to

2. Select 32 bit or 64 bit based on your computer.

To know whether your system is 32 bit or 64 bit, use the below link

3. Click Download.

4.  Extract the downloaded file.

5. Move the extracted eclipse folder to your desired location. In my case, I have moved the extracted folder eclipse to C drive.

6. Create a folder with the name Workspace inside the eclipse folder.

7. Double click eclipse.exe to open Eclipse.

8. Click Browse and select the folder created in step 6. Click Launch to open.

9. Navigate to Help --> Install New Software.

10. Click Add.

11. Enter the below Details.

Name: IDE


12. Click Select All and click "Next".

13. Click Next again.

13. Accept the agreement and click "Finish".

14. Restart Eclipse after installation.

15. Navigate to Windows --> Perspective --> Open Perspective --> Other.

16. Select and click Open.

17. Navigate to File --> New Project.

18. Enter Project name and credentials. Click "Finish" button to create the project.


Chatter Streams in Salesforce

Chatter streams are custom feeds that you create by combining multiple related feeds. Look for streams on your Chatter home page. Create up to 100 streams that each combine posts from up to 25 different feeds and feed types. Create streams that combine feeds from people, groups, and records, like accounts, opportunities, cases, and more.

1. Go to chatter tab and get started. Click + to create a chatter stream.

2. Enter details and Save Chatter Streams Salesforce.

You will be able to see all the feeds related to the records selected. You can select records across all objects.

How to get matching records from Duplicate Rule failure in Salesforce using Apex?

Sample Code:

        Contact contact = new Contact(LastName = 'Test');
        Set < Id > duplicateIds = new Set < Id >();
Database.SaveResult saveResult = Database.insert(contact, false);

        if ( !saveResult.isSuccess() ) {
            for ( Database.Error err : saveResult.getErrors() ) {
                if ( err instanceof Database.DuplicateError ) {
                    Database.DuplicateError duplicateError = (Database.DuplicateError)err;
                    Datacloud.DuplicateResult duplicateResult = duplicateError.getDuplicateResult();
                    Datacloud.MatchResult[] matchResults = duplicateResult.getMatchResults();
                    Datacloud.MatchResult matchResult = matchResults[0];
                    Datacloud.MatchRecord[] matchRecords = matchResult.getMatchRecords();
                    for ( Datacloud.MatchRecord matchRecord : matchRecords ) 

Reference Link - to Service Cloud Migration

If you are interested in to Service Cloud Migration, check the below link for considerations.

Before you move into the implementation phase of your project, it’s best to have some important pieces in place. These include a solid project team and a set of requirements for go-live. This unit helps you put together a preliminary structure for executing a successful move to Service Cloud.

When it comes to implementing a new solution, there are a lot of components to consider. What do you roll out in Phase 1 versus Phase 2 (or beyond)? For example, do you need all of those macros moved over to Service Cloud immediately, or is this transition a good time to do some spring cleaning and only migrate the few that your team regularly uses?

There are few trailhead modules specially designed for migration of to Service Cloud.

{“error”:“unsupported_grant_type”,“error_description”:“grant type not supported”}

When you face {“error”:“unsupported_grant_type”,“error_description”:“grant type not supported”} error, put all the information in the body instead of header.

1. If you are using POST, check whether the Content-Type is set as application/x-www-form-urlencoded.

2. Check whether setBody() has correct body data.

Salesforce Interview Questions with Answers Part 44

1. Describe some SF best practices and patterns that you have used?

2. What is the tuning performance? How do you increase it?

3. What is the apex design pattern? What is the continuous pattern?

4.One child record per one master details how would you achieve it?

5.Salesforce design pattern

6. What is asynchronous Apex?

@future, Queueable Interface, Batch Class.

7. What is the future method?

8. What is Queueable Apex?

9. What is Batch Apex?

10. How many batch jobs can be in a single queue?

You can only have 25 classes scheduled at one time. You can evaluate your current count by viewing the Scheduled Jobs page in Salesforce or programmatically using the Web services API to query the CronTrigger object.

While the batch apex states:

Up to five queued or active batch jobs are allowed for Apex.

10.The difference between Workflow and Process builder?

12. What is the flow?

13. What are the steps for inbound, and outbound web service calls?

14. How to handle the error in Apex (class)?

15. Salesforce Case Management?

Conditional Rendering in Lightning Component using aura:if in Salesforce

Lightning Component:


<aura:attribute name="strTest" type="String"/>

<aura:if isTrue="{!not(empty(v.strTest))}">
<aura:set attribute="else">


Check the below link for more methods

What Are Data Integration Rules in Salesforce?

Data integration keeps your data up-to-date. When you activate a data integration rule, Salesforce immediately checks your existing records against a data service to see if new data is available. New records are checked when they're saved. Based on your rule settings, your records are updated with new data.

Data integration rules let you specify the object and fields to update and the data service to use. In addition, the rules let you control triggers and workflow rules for the records that are updated.

1. Navigate to Data Integration Rules.

2. Activate Data Integration Rules.

3. Add Data Integration Rules related list.

4. Create a Formula field as below.


'Accuracy - ' & TEXT(BillingGeocodeAccuracy) & ' - Lattitude - ' & TEXT(BillingLatitude) & ' - Longitude - ' & TEXT(BillingLongitude)


Default Values formula in Picklist Fields Salesforce

Starting from Summer '17 Release, this is available.

Session-Based Permission Sets in Salesforce

Use a session-based permission set to allow functional access only during a predefined session type.

Flows or SOAP API can be used to activate and deactivate the session-based permission set.

Flow Components to Activate and Deactivate the permission Set

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

1. Edit the pick list field.

2. Click Promote to Global Value Set button.

3. Enter Label and Name. Click "Promote to Global Value Set" button.

How to enable Field Service Lightning in Salesforce

1. Go to Field Service Settings.

2.  Enable Field Service Lightning and click "Save" button.

How to set up Snap-Ins - Salesforce?

1. Be in Lightning Experience. If you are in Salesforce classic, kindly switch to Lightning Experience.

2. Go to Snap-Ins.

3. Click New Deployment.

4. Enter and select details. Click "Create" button.