Dreamforce 2019 Key Takeaways for Developers and Admins

Dreamforce 2019 Key Takeaways for Developers and Admins

Salesforce’s annual Dreamforce conference wrapped up recently in San Francisco and it was a huge success like all previous editions. 

The four-day event brought together some of the brightest minds and influential leaders in business and featured more than 2,500 different sessions. At Dreamforce 2019, Salesforce unveiled a lot of new updates and features for its products aimed at delivering personalized customer experiences.

Product Announcements at Dreamforce 2019

Customer 360 Truth – A new set of data and identity services that enable companies to build a single source of truth across sales, service, marketing, commerce and more to create a single, universal Salesforce ID for each customer. The goal of Customer 360 Truth is to provide companies easy access to data across multiple systems and a more efficient way to deliver and predict their customers’ needs.

Tableau – Tableau has announced Netflix-style AI-based visualization recommendations to help customers quickly find relevant previews and basic updates to Ask Data, and make better decisions.

Tableau has also introduced metrics to let business leaders easily and effortlessly track performance metrics. Users can easily create, track, and view key performance indicators from several dashboards. Also, Tableau has expanded its strategic relationship with Amazon Web Services by announcing Modern Cloud Analytics (MCA), a new initiative designed to help customers harness the full potential of self-service analytics. 

Salesforce and Apple Partnership

Salesforce and Apple have announced three new products at Dreamforce 2019.

Salesforce Mobile App, the revamped CRM application, Trailhead GO, the mobile app for Trailhead for iOS and iPadOS, and Salesforce Mobile SDK to empower developers to easily build and deploy native apps for iPhone and iPad.

Einstein Call Coaching 

The new solution for Sales Cloud enables managers to gain deep insights and identify trends within their sales teams’ conversations with clients.

Salesforce and Amazon Partnership

  • The latest Service Cloud Voice integrates telephony into the Salesforce Service Cloud to provide contact center agents with a complete set of tools in their agent workspaces that provide enhanced customer service support.
  • Salesforce and AWS offer AWS content on Trailhead, Salesforce’s free online training platform, designed to educate anyone on the cloud.

Dreamforce 2019 Announcement for Admins

  • Salesforce has introduced a service cloud voice through which admins can create custom versions of the Voice Assistant for every user with the help of Einstein Voice Assistant and Einstein Voice Skills.
  • Einstein Call Coaching is used to optimizing the sales team’s customer interactions through conversational intelligence.
  • Pardot enhancements include new Lightning email builders and sandboxes.
  • Make sure your data never crosses the public internet using private connect. 
  •  Lightning sandboxes can be refreshed on-demand and created in minutes.
  • With Security Command Centre, the admins can manage security policies and connectivity, view trends, receive proactive alerts and achieve multi-org visibility.

Dreamforce 2019 Announcements for Developers

  • With the Open sourcing Lightning Base Components, you can start developing your User Interface with more than 50 Lightning base components.  
  • Salesforce Blockchain is now available in Development Preview. 
  • Data Masking feature can be used to secure your sandbox data and choose how to encrypt or delete it.
  • Local development server is introduced to create, run and test the local Lightning web component.
  • With the new Einstein API and user interface features, you can create smart links and connections. You can build custom models with clicks with the Einstein Vision and Language application and analyze the text in six languages by Einstein Multi-Language Feature.
  • With the all-new real-time event monitoring features, you can create targeted transaction security policies to prevent data loss. 

Need any assistance with Salesforce development, CRM implementationdata migrationField Service Lightning, and Salesforce integration with third-party tools such as Outlook, MailChimp, and more? Contact Cloud Analogy – the world’s most trusted Salesforce Consulting Partner and Salesforce Development Company – now!

Salesforce Google Map Integration

Salesforce Google Map Integration

We are Salesforce™ Experts and we channelize our energy by documenting all the industry-specific technical problems we solve in Salesforce™ CRM world. Here I am about to explain one of the Google Map API with Saleforce.com custom development projects I was closely involved as a Salesforce™ Developer. At, below I will provide you the brief description of the project what basically it is and how we helped our end client.


In, this Project Client basically need a system viewer where he can calculate a distance between the source and the other records. The basic agenda of this project to help our end client where they will help their customer and they can identify all the machine from the source of Account.

The original idea of the project is that from a single Account record Source we need the ability to produce a list of other accounts. Account records that fall within a certain proximity radius to that account is a list of accounts that result from the search ‘Proximity’ accounts.

The account in the system could potentially be a source account. The user initiating the search from the Source account would first need to populate a screen showing various criteria information. Such criteria would include a ‘Radius’ setting we will provide the initial default value but we will need the ability to override.

Additional criteria would include two or three custom fields these currently exist on the Account record. It will provide default values for each but we will need the ability to override.

It is not mandatory that the list of Proximity accounts display in map form. If the Proximity accounts are displayed in a list, and not on a map, it is important that we can see the distance in miles from each Proximity account to the Source account.

We came with the solution:-

In,this what we acknowledge that from the list of account we can identify certain set of machines from the source to the estimate miles and can find out the list of machines from the source with different cost and it would ease to identify the certain machine from the list of miles and also it can be identified from the last sale day ago which we can filter from all the above source and then click on search. From this, it provides two option 

1-Generate pdf
2-View Map

Generate Pdf:- From this Option Customer after selecting their choices they will click on this option and they will get the detailed report within the Pdf.

View Map:- It provides the viewer to identify all the destination location of the products and analyze the certain destination via this map.



Now, with the following screenshots its methodology can be understood as follows:-

1) Search Filter with the various criteria


It can be understood with the following Code Snippets as follows. These are the few components which we deployed to the production.

1. Show All Account on Filter Controller:-

From below code, we are able to distinguish how to multi-select the option which is available on the filter-

public with sharing class ShowAllAccountOnFilterController {

public String recordID{get;set;}

public Account Sourceaccount{get;set;}

public double Last_Sale_Days_Ago{get;set;}

public list<Account> accountList{get;set;}

public list<Account> accountlistSearched{get;set;}

public list<Account> accountlistSearched1{get;set;} // list will show on map

public list<wrpclass> SearchAccountListWithMiles{get;set;}

public list<String> accountpicklistvalue;

public list<String> seletectedaccountpicklistvalue;

public boolean listisempty{get;set;}

public boolean showiflistfilled{get;set;}

public  String headerdata{get;set;}

At below there is a description of the above model with the ER Diagram





5 Mistakes A Salesforce Developer Can Commit Or Should Avoid

5 Mistakes A Salesforce Developer Can Commit Or Should Avoid

This Salesforce Blog is a developer’s experience in the Journey of Force.com development and customization. The problems faced by a day to day developer and the mistakes committed by them can sometimes be interesting and useful to a wide range of developers and administrators.

So let’s start the epic!!

Do Not Hardcode:

Once upon a time I was developing on a VF page and provided a link to a report(Our Standard Salesforce Reports in Visualforce Page:

So I hardcoded the URL for report as link in my VF page. The URL was working fine in sandbox and I was happy. Once I was done with development I migrated my changes to Production environment, Finally when I tested the application on the website I was unable to see the report on clicking the link.

But I got to know later that I cannot modify the apex class in production environment and I needed to fix it ASAP so it was all a big mess!

After scrutinizing the snag , I found that I had hardcoded the URL for my report and since the environment has changed  URL had stopped working.

So I finally  figured it out  using concept of dynamic URLs and used some code snippet like below:


Final Verdict: > DO NOT HARDCODE!!!

Avoid SOQL Errors:

While Developing have you encountered errors such as  “System.LimitException: Too many SOQL queries: 101” ?

This error System.LimitException : Too many SOQL queries: 101 is due to the fact, you are hitting on governor limit.

Our esteemed  Governor limits  says that you can run total 100 SOQL queries in a context and you are hitting the limit.

After a thorough study on the same I found that all the triggers fired will be counted in a single context or call. We need to ensure that total number of SOQL fired should be less than 100.

In order to pass this,  Many times i changed my  code in such a way that SOQL fired must be less than 100.

Sometimes I have also preferred if (only  we need to change the context)  using  @future annotation when I was required to run  the code asynchronously.

I made sure always  that the SOQL query I use should not be inside the for loop.

There are certain best practices which you would have to follow to avoid this error (to avoid hitting governor limit).





 Always follow the above practices to make sure you stay smiling at your workplace..

The challenging part is that one cannot increase the governor limit and can only follow best practices.

Streamline Multiple Triggers on same Object

 So here Is one more tricky situation:

Once I was working on a requirement (in short)  on the esteemed object Case to assign the account manager automatically. So I wrote a trigger which was  “Before Insert”.

I found that sometimes the account manager assigned was as expected and sometimes NOT!!

I was Bewildered !!

Like Always I started digging out checking debug logs, manual testing etc etc.

Finally Debug log was a ‘Maseeha’ telling me that I do have two more triggers with “Before Insert “ due to which system was unable to recognize the order of execution. Probably those codes were drafted by some other developers( of course my current and previous colleagues). I sat with them and finally came up with a single trigger with the same event on the object.

So in practice, Avoid multiple triggers with the same event on an object because it may discommode you at times.

Bulkify Your Code

So in the initial days of my Salesforce Development career, I faced something very terrible and good learning of course for me.

Let’s start with giving you some glimpse on my  poorly written code that only handles one record :

trigger BeforeInsert_Account on Account (before insert){

//This only handles the first record in the Trigger.new collection but if more than 1 Account initiated this trigger, those             additional records will not be processed

Account objAccount= Trigger.new[0];

List<Contact> contacts = [SELECT ID,salutation,firstName,lastName,email FROM Contact WHERE
 accountId = :acct.Id];

//and something something


I tested the trigger and it worked fine and I was done by my job and then suddenly one day trigger hit the governor limits.

Like always I was bewildered. Got to know that one of my sweet colleague has written a batch apex to insert the Accounts and this was the whole sole reason.

Since I couldn’t ask my sweet colleague to undo the batch class, I need to do something.

After digging,I found that if a batch of records invokes my Apex code, all of those records need to be processed as a bulk, which hits governor limits.

And the issue was  that only one Account record was handled because the code explicitly accesses only the first record in the Trigger.new collection by using the syntax Trigger.new[0]. Instead, the trigger should properly handle the entire collection of Accounts in the Trigger.new collection.

Here is a sample of how I handled all incoming records from batch:

trigger BeforeInsert_Account on Account (before insert){

//This only handles the first record in the Trigger.new collection but if more than 1 Account initiated this trigger, those additional records will not be processed

Account objAccount= Trigger.new[0];

List<Contact> contacts = [select ID, salutation,firstName,lastName,email FROM Contact 
WHERE accountId = :acct.Id];
//and something something……

Notice how this revised version of the code iterates across the entire Trigger.new collection with a for loop. Now if this trigger is invoked with a single Account or up to 200 Accounts, all records will be properly processed.

So always put down strategy to write bulkified code.Make it as practice, though it will be not easy but good for long terms!!

Follow General Design Guidelines for Application Performance

As per my experience in designing Visualforce you may develop a very rich UI with nice pop-ups and images but when the users start using it ,it becomes nettlesome for them to click or navigate to buttons.

I have written these general guidelines to avoid performance impacts:

  • Always design pages around specific tasks, with a sensible workflow and navigation between tasks.The DOTS should be connected everywhere.
  • Never  overload pages with functionality and data. Visualforce pages with unbounded data or a large number of components, rows and  fields have poor ability and performance, and they risk hitting governor limits for view state, heap size, record limits, and total page size.
  • Always try to push back on requests to include non-essential functionality.
  • Must Build prototypes to validate concerns.



Salesforce Sandboxes – Key Player in Managing & Deploying Customization

Salesforce Sandboxes – Key Player in Managing & Deploying Customization

What is a Sandbox?

A Sandbox to a developer/administrator is like a playground for a child, it allows the developer/administrators to customize, play and configure the application development environment without affecting the actual production release versions. Sandboxes in Salesforce are used for app development, code management, version control, testing, and training without compromising the actual data and applications in your Salesforce production organization.

Types Of Sandboxes:

  Developer Sandbox Developer Pro Sandbox Partial Copy Sandbox Full Sandbox
What is their Usage? For coding and testing in an isolated environment For coding and testing in an isolated environment For  Testing environments and quality assurance task For testing environments and for performance and  load testing and staging
What do they include of  Production Environment? A copy of production organization’s configuration (metadata). A copy of production organization’s configuration (metadata). They have a larger storage limit than Developer sandboxes. A copy of production organization’s configuration (metadata), and a subset of production data as defined by a sandbox template. Replica of the production organization.
Licenses with which you can create Sandboxes  ·  Full Sandbox ·  PartialCopy Sandbox ·  Developer Pro Sandbox ·  Developer Sandbox · Full Sandbox · PartialCopy Sandbox · Developer Pro Sandbox · Full Sandbox · PartialCopy Sandbox · Full Sandbox

Sandboxes In SDLC Process

In a Salesforce app development life cycle, comes various phases of code development, unit testing, UAT etc. A simple example is: 

   In a case when different teams work on multiple areas simultaneously which finally have to be merged into a single organization, that is a single Production environment, with time the process becomes rather complex. It overcomes this a staging platform is created to repressively test the performance without affecting the production version. An example for the same is shown below: 

Managing Sandboxes For Release Management Process

Though there is no thumb rule or out of the box process defined on which organizations are dependent on handling their release management system. But still there are some points on sandboxes to be considered for running the process:

  • Make a practice to refresh the sandboxes after every release so that we make sure to leverage the new features and make sure that our environment is compatible with the new changes.
  • Also, it’s recommended to have a strategy to align the org releases with Salesforce releases, in order to reduce the efforts for refreshing sandboxes.
  • A Post Refresh Run List should be prepared and followed every time sandboxes are refreshed after a new release. Few things which should be included are:
    • Data Masking Needs
    • User Profile Modifications
    • Test Data Loads
    • Deployment Plan
    • Turn Off Scheduled Jobs
    • Manage Outbound Email.

Hope this would help you in getting an overview of what Salesforce sandboxes are.

Role of a Salesforce Tester

Role of a Salesforce Tester

The Core Team

In a typical Salesforce Project delivery, the following resources from the core team:

  • Business Analysts
  • Project Managers/Scrum Masters
  • Quality Analysts/Testers
  • Developers
  • Administrators

The role of a Salesforce tester is that of a full-fledged engineer in its own right, therefore they are more commonly referred to as Quality Engineers as an alternative to Quality Assurance. Typically they are either Salesforce.com Certified Administrators or Salesforce.com Certified developers. In layman terms, they have all the skills to work on testing assignments for projects that follow Agile as well as traditional software life cycle and can review codes for bugs, and be able to design, write, maintain, and scale complex test frameworks, and sometimes even set up test environments from scratch.

What is the responsibility of a Salesforce Tester?

  • The major function of a Salesforce Tester includes services like Functional Testing, Unit Testing, Manual Testing, Automated Testing, Load Testing, Deployment Testing, and Security Testing.
  • Manual testing, for which specific type of experience and skills related to testing are not required, mainly includes the testing of Salesforce.com App using a human with a methodical approach
  • Testers having experience with AssureClick, Selenium, QTP etc. play a vital role in Salesforce Automated Testing.
  • Salesforce testers are required to test Salesforce.com or Force.com apps functional testing which incorporated Unit Testing and Process Testing.
  • Sometimes the testers are required to work on the application and gain the understanding of its functionality to create functions map. They then use the functions map to create and execute the test cases.
  • Other important testing types include:
    1. Salesforce.com Load testing
    2. Salesforce.com Security testing
    3. Salesforce.com CRM ad-hoc testing

As a career option, the growth prospects for a Salesforce tester are very rapid. ADM 201 certification can add to their career development immensely. With a background in testing, they make for qualified candidates for the role of future business analysts. Happy Testing!

Process Builder Vs Apex Triggers –  Choosing Between Automation Tools

Process Builder Vs Apex Triggers – Choosing Between Automation Tools

Process Builder Overview

Process Builder is a graphical representation of your process as you build it. It consists of

Criteria, Immediate and Scheduled Actions.

There are following things which can be done by process builder:

  • Create Records:In addition to updating a record, you can create a record and set the field values within the record.
  • Create Chatter Post:   Push a chatter update into Group or Feed.
  • Create an approval:Traditionally you needed a trigger to push a record into an approval process automatically. With Process builder, you can do this automatically based on criteria of the process.
  • Quickly consolidate Workflow:Quickly consolidate multiple workflow rules that in one process.
  • Call an Apex Class:You can now call an Apex class.

Trigger Overview

A trigger is the piece of code, that is executed Before or After a record is inserted or updated.

Usually, an APEX (code) based evaluation of criteria to set off a chain of events.These events execute the following types of operations

  • Insert
  • Update
  • Delete
  • Merge
  • Upsert
  • Undelete

In Apex Trigger you must have

  • Need to programming knowledge.
  • Need to design test classes to meet required test coverage.

But the main difference in process builder is you can not delete any record and can’t show any error. For these, you have to write Trigger code. For example:

Apex Limitations

  • Total number of records retrieved via SOQL queries                                       50,000
  • Total number of records retrieved by DML                                                        10,000
  • Total number of SOSL queries issued                                                                 100(Sync) | 200(Async)
  • Total number of SOSL queries issued                                                                 20
  • Total number of records retrieved by a single SOSL query                             2,000
  • Total number of DML statements issued                                                           150
  • Maximum number of characters for a trigger                                                   1 million

Process Builder Limitations

Editing: User can’t edit process once it has been activated.Therefore much like with flow, a new process needs to be created by cloning the initial process and making modifications to that cloned records.

Validation: Processes DO NOT  trigger Validation rule and can, therefore, invalidate data.

Deletion: The inactive process can’t be deleted for at least 12 hours after inactivation and do not appear in the Recycle Bin

Error Message: You can’t specify error messages when creating a process that doesn’t trigger as you can with flow or validation rules.

Formula help: When utilizing formula in criteria, there is no function help preview next to the syntax

Syntax: Pick-list fields are evaluated as text fields in process builder so that they won’t support any pick list formulas like ISCHANGED or ISNEW.

Apex Trigger Best Practices

  • Apex code must provide exception handling.
  • When query large data set use an SOQL FOR loop
  • Don’t use  SOSL and SOQL inside for loop.
  • Avoid Hard Coding IDs

Process Builder Best Practices

  • Check: To see if there are any workflows on the object doing the same things as the process. Also, verify no active Apex Trigger.
  • Avoid: Interviewing Apex, workflows, and processes together for the same process.
  • Document: Use the Description field to populate information such as when it was created by who and what the process does.Also, if processes work in conjunction with each other.
  • Test: And then test some more.Especially when you are first starting to use this please practice in the sandbox first.

There’s a lot of ability to impact users and data here if you do something wrong.

Now the question is Why Process Builder and how is it differ from trigger?

Process builder is fully customization. No code required here because we require lengthy logic and record to complete and fulfill the requirement or if we using process builder it will take less time to complete the requirement.

It has some benefits over the trigger:

Scenario I

Populate a lookup field on record update:

Traditionally required a trigger and It can be done easily with process builder.

The issue is Multi layer lookup logic- i.e. multiple / nested maps of related data required in the trigger.

          Process builder Trigger Traditionally been something that requires a Trigger. Process builder allows administrator can do this without the use of the code.
Scenario II

Set an Account Owner based on Record criteria

Process builder


Process builder can be used to assign ownership of records based on criteria in the object.
Scenario III

Post a chatter message based on record criteria

Process builder


Process builder can be used to post to chatter based on record criteria.
Scenario IV

Submit a Quote for Approval when Opportunity Stage= Proposal

Process builder Trigger Requires 2 Processes one to Update the Quote based on the opportunity stage and another to submit the quote for the approval when the criteria on the quote had been met.
Scenario V

Launch a Flow via record criteria vs a button or link.

Process builder


Process builder can be used to set record criteria and then launch a trigger ready flow.
Scenario VI

Clone an opportunity and change the field values

Process builder


Although Process builder can create a new record it can’t reference any of the values from the cloned opportunity without the use of a flow to capture the opportunity values.

Let’s have a look on given Process builder example :

Allow Contact to copy Current User Address in Contact Address and Account Billing Address only when any address field(Street, Country, state )is blank/NULL.

Step 1:

Make your Process-builder on Contact Object. Provide the criteria as Contact.Mailing Street (IS NULL = FALSE) and likewise for every address fields of Contact and Opportunity.

Step 2:

In “Immediate Action” give reference of Mailing Country to that of Contact.Owner.Country and Activate your Process as:

 Step 3:

Now test this process builder in your org by leaving any address field blank in your org.

Step 4:

After leaving Contact address blank here is the address which got autofilled same as contact’s owner address. Similarly you can test this for your Contact’s Account.

This is the reason for using Process builder rather than using Apex. But  in some scenarios you’ll have to write trigger code where process builder can’t be.

For example:

Create a checkbox field “SAME COUNTRY AS USER & COMPANY”. Throw error when a Contact is getting inserted in Salesforce having Country same as User country and Company country.

Above example can’t be done via Process builder since this do not allow you to throw error while inserting Contact.
Create  Checkbox field named “SAME COUNTRY AS USER & COMPANY” on Contact.

public class SameUserAndCompanyCountryContact {

public static void sameCountry(List<Contact> conList){

   User user = new User();

   user = [SELECT Id , Country , CompanyName from User where Id =:UserInfo.getUserId()];


Organization orgDetails = [ SELECT Name , Country , Address from Organization where Name =: user.CompanyName];


for(Contact con : conList) {

  if(con.MailingCountry == user.Country && con.MailingCountry == orgDetails.Country){

   con.addError('Country of Company and User is same as country of Contact trying to insert');

     con.Same_Country_As_User_And_Company__c = True;




trigger ErrorOnSameCountry on Contact (before insert){
  List<Contact> conList = Trigger.new;
     if(conList!=null) {


Although the usage of process builder over apex trigger or vice versa is dependent on various other factors too, such as:

  • Complexity Of Codes.
  • Programmatic Logics.
  • Rapid Iteration In Process Builder Can Be Challenging.
  • Unit Test Considerations.