Salesforce Optimizer - Spring 17 New Feature

Salesforce introduced the new feature in Spring'17 - Salesforce Optimizer. This is really a nice tool which will evaluate your implementation in terms of the Salesforce features you are using and then identifies the ways to improve the implementation.

We all know that continuous improvement is very important, but in reality driving that continuous improvement sometimes becomes a challenging task. In my Salesforce experience, I faced the below problems when it comes to improvement -
  • I know I need to do improvement, but where is the time? Where to start from?
  • I really need trustworthy tools and guidance to help me driving the improvement
  • I need to convince business in terms of the importance of improvement.
  • I don't want to go to bed every day with the worry that I may be missing something which might break my implementation tomorrow.
That's quite a lot!! 
But now with Salesforce Optimizer, I have the answer to all of my doubts, questions.

Salesforce Optimizer is available in 
  • Classic and Lightning Experience
  • Professional, Enterprise, Performance, Unlimited and Developer Editions
  • Sandbox and Production Environments.
To access Salesforce Optimizer, you need below permissions -
You can find the documentation here -
Salesforce Optimizer Documentation

You will find the Salesforce Optimizer under Setup | Monitor | Optimizer 

Once you click on the Optimizer, on the next page, you need to Launch Optimizer by clicking on the Launch button.

Salesforce will generate the report and send the report to your email address.

Once you will open the report, you will find the report on the below features -

If the implementation is as per the best practices, you will find -

If the implementation is not as per the best practices and needs improvement, you will find -

I really love this new initiative from Salesforce, though there are many scopes of improvements in terms of items to be covered in the report. It will be really great to have Apex Class, VisualForce Page, Test Class included in the report.

There is a success community where we can provide our feedbacks using #OptimizerReportFeedback.

Please let me know if you are using this new feature and what is your comment on this. 
Wishing you a nice weekend.  


Salesforce Advanced Administrator Certification Tips

I took Salesforce Advanced Administrator certification exam on 31st Jan'17 and cleared it. In this post, I am going to write down how I approached this certification and my study materials as well.
First, to start you, you need the Salesforce Advanced Administration Certification guide. You can download the same from here. The exam format is -
  • Number of questions: 63
  • Type of questions: Multiple-Choice
  • Passing Score: 65%
  • Time: 90 Minutes
So basically you need to answer ~41 questions correctly. 
Note - You need to clear Salesforce Certified Administration Certification before this certification.

I followed the below strategy by reviewing the certification guide and bucketing the items based on their weightages. This is the formula I followed, topics with more than 10% weightage are my priority items and rest of the items are kind of last minute items to check.

With the above strategy, I came up with the below list -
  • Security and Access
  • Sales Cloud Applications
  • Service Cloud Applications
  • Data Management
  • Change Management
  • Analytics, Reports and Dashboards
  • Process Automation
But definitely, I was not sure whether I can answer all the questions correctly from above lists. So my backup plan was to make myself comfortable with the below items as well -
  • Extending Custom Objects and Applications
  • Auditoring and Monitoring
These two sections are comparatively very easy and easily you can answer all the questions correctly. The only section which I was not sure and didn't put any effort at all was - Content Management. Note - I got 2-3 questions from this section in the actual exam.

Study Material:
I started with Partner Training - Administrator Essentials for Experienced Admin (ADM 211). I will highly recommend you to go through this training if you have access to it. The entire training is very much focused. It is my experience that if you can complete these training, 80% of your preparation is done. This training will not cover the Service Cloud part of the certification. But if you have access to Partner Training, there is another training which you should consider as well - Service Cloud for Admin.

But if you don't have access to the partner training, you can concentrate on the below study materials to understand the concept needed. I am writing them below -
I have mentioned all my study materials at the top. Apart from studying individual concepts, I tried to practice the same in my developer org. Practicing the items in your developer org will help you to understand the concept. Remember - Salesforce Advanced Administrator Certification is all about how much you are comfortable with concepts and have you done implementation before on those concepts? So practicing in your developer org will give you that extra edge for sure.

Finally, I have completed few Mock Exams to understand my readiness. Again, don't trust any of the Mock Exam. Use them to understand which section of the exam you need to put more effort. Repeat this same step multiple times until and unless you get the answer - YES for the question - AM I READY FOR THE EXAM?

Below are few Mock Exams I used -

- Sudipta

Feel free to add your comments and add resources which helped you. 

Product Schedule in Salesforce

In Sales Cloud, when companies are dealing with Accounts, Contacts, Opportunities and Products, one thing is very obvious who the company will get the money back from the Contacts for the Products sold to them. Are the contact/account going to pay all together in one shot or are they going to pay over the period of times(Equal Installments)? 

Salesforce has the answer to these questions. In Salesforce you can configure how your customer will pay you the money. Based on that configuration, you can run your business reports to track your sales matrices. The way you can configure this in Salesforce is known as Product Schedule. Product Schedule are the payment or delivery cycles for the products which will be either paid over time or delivered over time. 

In Salesforce we have three different types of schedules. 
  • Quantity Schedule: Choose this schedule when you want your products to be delivered over the period of time. Example - Consider your customer bought subscription of one magazine from you for the next 2 years. Now you need to courier the monthly subscription to your customer every month. So in this scenario, you will go for Quantity Schedule.
  • Revenue Schedule: Choose this schedule when you want your customer to be billed over the period of time. Example - Consider you are selling House Insurance to your customer. The total cost is USD 1200 for one year. But you will bill customer on monthly basis i.e. USD 100 per month. In this scenario, you will go for Revenue Schedule.
  • Revenue and Quantity Schedule: Choose this schedule when a product will be delivered over the period of time and you bill your customer also over the time. Example - Consider your customer bought the subscription of one magazine for next 2 years. But this time instead of charging your customer at the beginning, you will charge the customer on monthly basis and also courier the magazine on monthly basis. In this scenario, you will go for Revenue and Quantity Schedule.
Schedule Type:
Schedule Type defines how the Number of Installments is used. There are two types of Schedule Type 
  • Divide: Here the Unit Price is divided by the number of installments.
  • Repeat: Here the Unit Price is multiplied by the number of installments.
Product Schedule can be enabled from Setup > Customize > Products > Product Schedules Settings.

Note - Read this post from Salesforce on Consideration for using Product Schedules.

Default Schedule:
A default schedule is associated with a product for a particular price book. Every time such product is added to the Opportunity, the default schedule is automatically added as well. Even though default schedule is automatically added to the Opportunity, Sales Rep can still change the schedule. 

Let's go for some Use Cases.

Use Case # 1
Company ABCD is selling subscription of their magazine - "Let's Enjoy". This magazine is getting published on monthly basis and cost of each publication is USD 10.00. Company ABCD is having customer who is planning to buy the subscription for next 2 years. Sales Rep of ABCD will now create the opportunity, add the product and product schedule as well.

Assumption: Product "Let's Enjoy" is having no default schedule setup.
Product is configured as shown below -
Now create the opportunity and add the product to the opportunity as shown below -

Let's configure the Product Schedule now as shown below in the below pictures -

So now Quantity Schedule is configured in Salesforce.

Use Case # 2
Company MNOP is selling "House Insurance". Cost of House Insurance is USD 1200 per year. Company wants to bill customer for this insurance on monthly basis. Sales Rep of MNOP will now create the opportunity, add the product and product schedule as well.

Product is configured as shown below -
Now create the opportunity and add the product to the opportunity as shown below -

Let's configure the Product Schedule now as shown below in the below pictures -
So now Revenue Schedule is configured and the total amount i.e. USD 1200 is divided into 12 equal monthly payments i.e. USD 100.00.

Note - If a product is having both default Quantity and Revenue Schedule, then Quantity Schedule is calculated first to determine the total product revenue. Then the Revenue Schedule is applied to the amount. I will explain this in my next Use Case.

Use Case # 3
Company IJKL is selling Medicine Box (Cost is USD 10.00 per box) to hospital BCD. The quantity of Medicine Box is 1000. Company will deliver the boxes over the period of 12 months on monthly basis. Company will send the bill to hospital quarterly over the period of 6 installments. Sales Rep of IJKL will now create the opportunity, add the product and product schedule as well.

Product is configured as shown below -

Now create the opportunity and add the product to the opportunity as shown below -

Default Schedule will be applied and it will be displayed as -

As the above picture says, the quantity is distributed on monthly basis where the revenue is distributed on quarterly basis.

I hope with the above examples, the concept - Product Schedule will be easy for you to understand. Please provide your feedback. Thanks.

Relationship between Product, Price Book and PricebookEntry

In my previous post, I have explained the basic concepts about Products and PriceBooks. You can read the post here - Products and Price Books in Salesforce.

Now in this post, I am going to explain the relationship between Product, Price Book and PricebookEntry. So let's start with few basics.

  • Products are represented by Standard Object - Product2.
  • PriceBooks are represented by Standard Object - Pricebook2
  • Each Pricebook can have zero or more entries. Each of these entries are stored inside the Standard Object - PricebookEntry. Each entry in PricebookEntry defines the cost of the products in a particular currency.
  • These three objects - Product2, Pricebook2 and PricebookEntry will only be available if Product is enabled in the organization.
Data Model:
  • PricebookEntry is the junction object between Product and Price Book.
  • OpportunityLineItem is the junction object between Opportunity and PricebookEntry.

Below is the flow diagram depicting the process to load Products and setup PriceBook through API.

I hope this post will help you to understand the relationships between these objects. Please provide your feedback. Thanks.

Products and Price Books in Salesforce

Define your Product:
A Product is a service or item that the company sells to the customers. Once you have added the Products, you can set the price of the product per unit based on your business. In Salesforce, Product is a Standard object having standard fields and tabs. You can add your custom fields to customize Product object as per your business requirement. Products can be added to the Opportunity allowing you to have an correct inventory and also make your forecasting accurate.

What is Price Book:
The Price Book will provide the list of products and their prices per unit. You can create multiple price books to maintain different prices for the same product based on your business needs. Salesforce will always provide your a Standard Price Book. The moment you add a Product into Salesforce and set the price of the Product, that Product will go into Standard Price Book. But you can create Custom Price Book as well.

Use case of Custom Price Book:
Let's say, the company "Universal Company" is selling the product - "Desktop Mouse" globally. The company is running it's business from Canada. But company is selling products globally. Now when this company is selling "Desktop Mouse" within Canada, the price is USD 12.00, but when it is selling the same product in Europe, the price is USD 19.00 (due to extra shipping cost), similarly then the same product will be sold in APAC, the price will be USD 20.00. Now to maintain different prices for the same product based on geography, we need to create three different Custom Price Books - Canada Price Book, Europe Price Book and APAC Price Book.

Don't worry, I will provide you the entire step by step configuration in later part of this post. Let's concentrate on the basic concepts and considerations while configuring Products and Price Books in Salesforce.

Important Notes on Creating Products:
  • Permission needed to create Products are "read" and "create" permission on Product object.
  • You can create Products by cloning an existing Product. But if you don't have sharing access in any of the Price Books, then entries for that Price Book and Product combination will not be created. Similarly if you have read-only access on any fields, value of that field will not be carried over to the cloned record.
  • It is recommended to not have more than 2,000,000 products otherwise it may impact the performance.
  • Products always needs an active Price Book so that you can add the product to that Price Book.
  • Product object is having a standard field - Product Currency. This field holds the currency of the product. In a multi currency organization, if the product currency is different from user's currency, then product currency will be converted into user's currency and both the values will be displayed. (Converted amount will be displayed in parentheses).
Sharing Price Books:
  • Admin or user with with "Edit" permission on Price Book can share the same with more users, groups, roles and territories.
  • You can't make it more restrictive.
  • Sharing option will only be available when the OWD of Price Book is either "No Access" or "View Only".
  • Price Book Sharing is not available under Salesforce Lightning Experience(Latest release is Spring'17 when I am writing this blog post). It is available only in Salesforce Classic.
Want to remove Price Books? Need to know below points -
  • You can delete, deactivate or archive Custom Price Books. It is having no impact on other Custom Price Books. These action will impact Opportunity and Quotes.
  • You need to change association with Opportunity or Quotes before removing an associated Price Book.
  • For Standard Price Book, you can deactivate the same, but can't delete or achieve it.
  • You can't delete a Price Book while it's in use on Opportunities or Quotes. Trying to do the same will create a list of Opportunities or Quotes where the Price Book is being used.
  • You can deactivate a Price Book while it is being used in Opportunities or Quotes. Managing Entries is also possible for deactivated Price Books and you can re-activate the same as well.
  • You can archive a Price Book even if it being used in Opportunities or Quotes. Archived or Deleted Price Books can't be recovered.
Want to remove Products from Price Books?
  • You can remove Products from a Price Book as long as that Price Book + Product combination is not being used in any existing Opportunity or Quotes. Removing Products from a Price Book will not impact other Price Books where the same Products are listed as well.
  • If a Product + Price Book combination is being used in any of the existing Opportunity or Quotes and you want to remove the Product from that Price Book, you have three options, which is explained here - 
Important Note - While associating Products with an Opportunity, you need to select the Price Book first. An Opportunity can have Products only from one Price Book.

Use Case:
The company "Universal Company" is selling three products - Mouse, Monitor and Laptop. The price of each Products is different for each Geography. The detail is displayed below -

Implementation -
  • Create three different Products in Salesforce with Standard Price and add them in Standard Price Book as shown below - 
  • Now create three different Price Books and add the products there with the corresponding prices as shown below - 
In my next post, I will explain the relationship between Price Book, Product and PricebookEntry. Please let me know your feedback. Thanks.


Delegate Administrator

In a big organization, a single admin can a big problem in terms of bandwidth issues. Normally admins are getting multiple requests like - creating users, updating profiles, resetting the password, running report etc. along with their daily meetings. So it will be really difficult for a single admin to handle all these requests by himself/herself. And that is the place where admins want to delegate some of their work to others (trusted colleagues). But trust me, it is a big decision. You should not give all the admin privilege to your colleagues even though he/she is a very trusted employee. Rather you should delegate few specific task to your colleagues. In Salesforce, we can do the same with DELEGATE ADMINISTRATION.

So basically Delegate Administrator will allow named users to manage other users within selected roles and profiles, as well as managed selected custom objects.

With Delegate Administration, you can configure named users to do the below things -

  • Role & Subordinate:  Delegate Administrator can create and edit users with specific roles and subordinates. The can't modify the role hierarchy though.
  • Profile:  Delegate Administrator can assign users(they create or edit) to assigned profiles. They can't modify the profile.
  • Permission Set: Delegate Administrator can add/remove selected permission sets from users(they create or edit) to assigned profiles. They can't modify the permission set.
  • Public Group: Delegate Administrator can add/remove selected public groups from users(they create or edit) to assigned profiles. They can't modify the public group.
  • Custom Object: Delegate Administrator can manage every aspect of the selected custom objects except object's permission on profiles. Delegate Admin can't create or modify relationship on the objects or set org-side sharing defaults.
  • Enable Login Access: Delegate Administrator can login in as a user belonging to the role hierarchy that they manage.
  • Unlock and Freeze User.
To make an existing user as "Delegate Administrator", you need "Customize Application" Permission and that user need "View Setup and Configuration" permission.

Note - "View Setup and Configuration" permission is always a tricky one as it will open up many  more permissions to the users. So before giving this permission to any user, you should think multiple times and justify yourself. Giving "View Setup and Configuration" permission to a user so that you can mark that user as Delegate Admin should NOT be the correct approach. I will highly recommend you to read the post - "Become More Efficient With Delegated Administrators" from AdminHero.

Use Case:
I have two users in my Org - Administrator (Sudipta Deb) and Non-Administrator(Mario Ruiz). I want to mark Mario as Delegate Administrator so that he can take care of creating/editing users with Profile - "Recruiter" or with the role - "VP, North America Sales". At the same time, I would like to make sure he can take some of the request related to custom objects - Position, Job Application, Employment Website, Job Posting.

  • Open Delegate Administration: Click on Setup | Administer | Security Controls | Delegate Administration.
  • Click on New
  • Put the below details as shown in the picture -
  • In the next page, under "User Administration", select the role - "VP, North America Sales" like shown below - 
  • In the next page, under "Assignable Profiles", select the profile- "Recruiter" like shown below 
  • In the next page, under "Custom Object Administration", select the objects - "Position, Job Application, Employment Website, Job Posting" like shown below - 
  • Add the user "Mario Ruiz" under "Delegated Administrator
  • Finally, it will look like - 

There are few limitations as well with Delegate Administrator which are -
  • Can't assign profiles or permission sets with "Modify All Data" permission.
  • The -None- option will not be available when selecting roles for new users.
  • For formula fields, accessing merge fields from another object requires delegate admin's permission on that object.
  • Can't modify permission sets.
  • Standard Objects are excluded from Delegated Administration. We have a Salesforce Idea open for this - https://success.salesforce.com/ideaView?id=08730000000BptIAAS
  • Another Salesforce Idea worth mentioning here is - Allowing Non-Admin users to import custom objects - https://success.salesforce.com/ideaView?id=08730000000Bre6
  • For security, profiles with the “Modify All Data” permission cannot be included under "Assignable Profiles". See the error when attempting to include the System Administrator profile. 
  • Delegate Admin can change the FLS for existing and newly created fields for those objects which are assigned to him/her. But Delegate Admin can't change the Object Level Permission on Profile.
Are you using Delegate Administrator in your org? What use case you are handling using Delegate Administrator? What problem(if any) you faced? Please share your feedback. 

JavaScript Tips for Visualforce Developers

When I started my career 10 years back, I was first introduced to Server Side Programming. I started developing applications using Embedded C/C++. Slowly I shifted my focus towards Client Side Programming. It always motivates me if I see the end-result of my development immediately. That is how I started digging into Client Side Programmings. I always love this below quote from one of my favorite programmers - Eric Elliott

In my initial days I still remember, it was really difficult to learn JavaScript. To me, Javascript was more like a "side" language which can help implementing those functionalities which can't be delivered by server side programming - such as DOM manipulations, browser events and things like that. So for me sending data between server and client was always a GET and POST.

But I realized the power of JavaScript very soon. Trust me, with JavaScript, you can do so many things you can't even imagine. You can not only do Client Side operations, you can perform server-side logics as well. Yes, you hear it correctly. JavaScript for Server Side Programming. With the "node.js"  you can perform server-side computations as well. But there is even more. We can now build Isomorphic applications as well. With an Isomorphic application, your initial request from the web browser will be handled by the server, but after that, any subsequent requests will be handled by the client. I will not get into the detail of isomorphic applications here. That will take the entire blog post, which is not the intention here. You can check the details about the Isomorphic application here.

We all know that Salesforce introduced Lightning which is the new way of developing applications using aura framework. Now you can build Lightning components which can be used to build SPA(Single Page Application), Record Detail Pages, Home Pages etc. Lightning brings a development paradigm shift from traditional Visualforce+Apex centric development. But as we all know Visualforce is very matured and there are so many customers using Visualforce to build/enhance their applications. So Visualforce is definitely not going away. But as per the recent trend from Salesforce, it seems like most of the new features will be delivered in Lightning (That is now the main focus area of Salesforce) and bug fixes/critical enhancement will be delivered for Visualforce. But since Visualforce is not going anyway and I know there are so many customers which still feel more comfortable with Visualforce page, so putting your effort to learn Visualforce page still makes sense to me. With Visualforce, customizing the application as per customer's branding and requirement sometimes become really a challenging work and we need to take the help of JavaScript and other model JavaScript libraries like Jquery, AngularJs etc.

So I would like to share my experience regarding working with JavaScript and Visualforce page. Let's get started -

Tip # 1 - Learn JavaScript
There is no alternative of learning JavaScript. There are many resources available which you can utilize to learn as well as enhance your JavaScript knowledge. I am sharing few of them below -
Along with learning JavaScript, you should learn some browser tools as well. Chrome DevTools for Chrome browser is probably the most used tools. With Chrome DevTools you can use some of the really advanced as well as helpful features such as - Interactive Debugging, Inspect Elements, Device Emulation, Performance Profilings, JavaScript CPU Profiling etc.

Tip # 2 - Put your JavaScript in Static Resource
As per best practice, you should put your JavaScript in Static Resource. It will minimize the load time of the page. You can access JavaScript from Static Resource in the below way -

We have some real advantages by putting JavaScript in Static Resources. We all are familiar with merge syntax in JavaScript like below -

The above code looks very simple. But the there is a catch, by putting the above line we are making the JavaScript tightly coupled with VisualForce rendering. By tightly coupled, I mean if due to some reason the JavaScript is not processed by Visualforce rending engine, then the merge syntax will not be evaluated and in the Visualforce page it will be displayed as {!Case.CaseNumber} instead of the actual value.

If we move the JavaScript in Static Resource, then the same JavaScript will be loaded as an external file to the browser and browser will cache the external file. This means for every call, JavaScript will not be delivered to the browser, rather browser will use the cached JavaScript. External files are always included once the VisualForce page is finished rendering and delivered to the browser. So by adding JavaScripts in Static Resource, they will be delivered as an External file to the browser and those JavaScripts will be processed by the browser, not the VisualForce rendering engine.

I will always say that while doing development, you can keep your JavaScripts in the VisualForce page rather than in Static Resource. It will help you to debug and fix the issues quickly. But once this is done, please move all your JavaScript in Static Resource.

Tip # 3 - Avoid Cross-Site Scripting Issues
A developer should always use JSENCODE and JSINHTMLENCODE functions which will help to prevent cross-site scripting. Consider the below code:

Here if the value of the parameter emailAddress is alert('Your account is hacked!!'), then the above code will execute the JavaScript function. In the same way, any JavaScript can be executed to fetch some important information. To stop that we should use the JSENCODE function like below -

To learn more about Injection Vulnerability Prevention, please go through the below trailhead link -

Tip # 4 - Go For an Efficient Development Process
Working with JavaScript and Visualforce sometimes makes the life of a developer difficult as you need to change JavaScript to solve issues, zip it and upload the same and then test. And this process you may need to repeat quite a  number of times. If you also face this same issue like me, then I would like to let you know that MavensMate has a solution for you i.e. resource bundles. Resource Bundles will allow you to direct editing of the files and makes the uploading process very easy. There are some tools as well which can help you as well like grunt or gulp. But I feel MavensMate is very easy to start with. Grunt and Gulp are more for the advanced stage.

Tip # 5 - Keep an eye on variable declaration
Always use JavaScript object and put all your variables inside those objects. This will help you to make sure that your declared variables are not getting overwritten by Global Namespace i.e. window object. So you should declare your variables always like -

Bonus Tips
A developer should read the best practices for JavaScript related in Visualforce Developer Guide.

With all the above tips, I hope it will help you to write efficient JavaScript code. Please let me know your comments. Thanks.

How to generate Debug Logs for Guest Users || Changes done in Winter'17 Release

Recently while working on public sites, I have noticed that debug logs are not getting generated for guest users in the same way it was used to work earlier. Debug log is always handy while working in Salesforce. It will help you to debug the problems, help you to understand the flow etc.

So while debug log was not getting generated, it became so difficult for me to debug the issues. After few hours of searching in Google, I have realized that in Winter'17 release, Salesforce changed the way of debug log generation for Guest Users. By "Guest User" I wanted to mean users having Guest User License.

The reason behind the change is - Public sites are getting used by many users(Guest Users). So setting up a debug log for Guest sUer may generate multiple debug logs which will quickly fill up the debug log. 

After Winter'17 release, Salesforce made some changes and due to that debug logs will be generated only for those targeted users. But what will differentiate those target users from the all other users using that public sites? Good questions. Answer to the question is that debug log will only be generated for those Guest users using the browser which has a special cookie

Really is it "Cookie"? Yes, now cookie will decide whether the debug log will be generated or not. 

Ok, the next question is how can I set that special "Cookie" in my browser? The answer is also very simple and below are the steps you need to follow -

  • Open the site in your browser. [Note - I am using Google Chrome, but any browser will work].
  • Open the Chrome DevTools console by right clicking in the page and opening the "inspect" section. 
  • Execute the below command to set the cookie -
  1. If the domain is .force.com domain, paste the below command in the console and execute - document.cookie="debug_logs=debug_logs;domain=.force.com";
  2. If you use the custom domain(say yourCustomDomain.com), paste the below command in the console and execute - document.cookie="debug_logs=debug_logs;domain=yourCustomDomain.com";
This new feature is available in both Lightning Experience and Salesforce Classic.
I hope this post will help you while debugging your public sites.
Please post your feedback. Thanks.


Salesforce Platform Developer - I Certification Tips

I have cleared another Salesforce Certification yesterday - It's Platform Developer - I. In this post, I am going to share my study notes. Hopefully it will help others as well.

If you are an experienced developer or admin having more than 6 months of experience, it is very easy to clear this certification. But if you are new to Salesforce, then I think this study note is going to help you. I found 50% - 60% questions are scenario based.

During the exam, I am sure you will get multiple questions which will make you confuse in terms of more than one correct answers. My suggestion is that read the question/scenario 2-3 times, there will be one/two words which will lead to the correct answer. If you still not able to find the correct answer, mark the question for review and go to the next question. Don't spend too much time in one question.

Note - Don't treat this as a Certification dumps. Rather the intention of the post is to share my strategy, topics I covered during my preparation.

Another important point to mention here is that when I gave this certification the release from Salesforce was Winter'17. With every release, Salesforce brings new features so you need to go through the release notes as well.

Let's start by topics mentioned in the Certification Syllabus. 
  1. Salesforce Fundamentals [Weighting: 10% i.e. # of Questions: 6]
    • Describe the considerations when developing in a multi-tenant environment
      • Study Guide:
      • Notes:
        • Keep tenant-specific data secure in a shared database so that one tenant can't see another tenant's data.
        • Customize various schema objects and an application's user interface in real time without affecting the functionality or availability of the system for all other tenants.
        • Can the system's code base be patched or upgraded without breaking tenant-specific schemas?
        • Will the system's response time scale as tens of thousands of tenants use the service?
    • Describe how the Salesforce platform features map to the MVC pattern
      • Study Guide:
      • Notes:
    • Describe the capabilities of the core CRM objects in the Salesforce schema
    • Identify the common scenarios for extending an application's capabilities using the AppExchange
    • Given a scenario, identify common use cases for declarative customization
      • Study Guide:
        • Scenario based question which will focus on test takers ability to identify whether to use formula, roll-up summary field, validation rule, workflow rule, process builder or approval process. Refer trailhead modules ‘process automation’ and ‘formula fields and validations’
      • Notes:
  2. Data Modeling and Management [Weighting: 12% i.e. # of Questions: ~8]
  3. Logic and Process Automation [Weighting: 46% i.e. # of Questions: ~28]
    • Describe how to programmatically access and utilize the object schema.
    • Describe the capabilities and use cases for formula fields.
      • Study Guide:
      • Order of execution:
        • Formula fields are executed/evaluated at access time, be it through VF page or API or Apex.
      • Formula Field Limitations:
        • The value of Formula field can’t depend on another formula field.
        • You can’t delete fields which is getting referenced in formula field.
        • You can’t use long text area, encrypted, or Description fields in formulas.
        • Default value formulas for a record type can only reference fields for that record type.
        • However formula fields and formulas for approval, validation rule can access fields from that object as well any object which are associated with that object either through lookup or master-detail relationship.
      • Formula Field Data Types:
        • Checkbox
        • Currency
        • Date
        • Date/Time
        • Number
        • Percent
        • Text
      • Cross-Object Formula Fields:
        • Cross-Object formula works with master-detail as well as lookup relationship. You need to make sure cross-object formula field is on the detail side of the master-detail relationship.
        • Cross-Object formula can reference fields from objects that are upto 10 relationships away.
        • Cross-Object formula referencing Currency field converts the currency value as per the record where the formula field is added.
        • However is the currency field is from a custom settings, then the value will not be converted.
        • Salesforce allows a maximum 10 unique relationships per object in cross-object formulas.
        • You can’t reference cross-object formulas in roll-up summary fields.
        • In cross-object formulas, you can’t reference merge fields for objects related to Activities. For example, merge fields for Account and Contact are not available in cross-object formulas in Task and Event object.
        • Important - While creating formula field, if you are referencing fields from an object where you don’t have read access, you will still be able to see the information. For example - If in the Case object, you are creating a formula field which is referencing fields from Account object and you don’t have read/view permission on Account object, you will still be able to see the information in Case page layout.
        • Important - Cross-Object formula is all about getting information of Parent object in Child object. So in the exam, if you are getting questions where you need to fetch child information in parent record, then it should be roll-up summary field.
    • Describe the capabilities and use cases for roll-up summary fields.
      • Study Guide:
      • Roll-Up Summary Field:
        • Roll-Up Summary Field works only the master-detail relationship.
        • Roll-Up Summary Field should be set in the master object.
        • When you delete a record in the detail side, Salesforce doesn’t recalculate the value of Roll-Up Summary field. Select the option Force a mass recalculation on this field on the edit page of the roll-up summary field to manually recalculate  the value.
        • Auto number fields are not available for aggregate in roll-up summary field.
        • Once you have created Roll-Up summary field, you can’t change the relationship to Lookup.
        • Changes to the value of Roll-Up summary field can trigger assignment rules to run.
        • A Roll-Up summary field can trigger workflow rules and field validations.
        • If your organization is having multiple currency, then currency on the master record will determine the currency of the roll-up summary field.
        • Salesforce will not allow updating/saving related records if it is violating validation rule on Roll-Up Summary field.
        • Fields that user cannot see due to FLS on the detail record are still calculated in a roll-up summary field.
        • Roll-up summary field is not available in the edit page. So they can’t be used as error location for your validation.
    • Describe the capabilities of the declarative process automation features.
      • Study Guide:
      • Notes:
        • If there is a situation where you need to choose between Process Builder and Workflow, you should always select Process Builder as Process Builder supersedes Workflow.
        • Workflow can update only parent fields in cross-object update whereas Process Builder can update either parent or child.
        • The only thing which you can do with Workflow, but not with Process Builder is send outbound messages without code. However, you can work around this limitation by calling Apex code from a Process Builder.
        • If the process is too complex for Process Builder, you should always go for Visual Workflow.
        • If you need to get information from customer, then Visual Workflow should be your solution approach. Based on the information received from user, write your logic to perform multiple logics.
        • Where approval is required, you need to go for Approval Process.
        • Check the below picture for capabilities -  https://trailhead.salesforce.com/business_process_automation/process_whichtool
    • Describe when to use declarative automation features vs. Apex classes and triggers
    • Describe how to declare variables and constants in Apex and how to assign values using expressions. 
    • Describe the primitive and complex Apex data types and when to use them.
      • Study Guides:
        • Topic should be covered by the above link
      • Notes:
    • Describe how to use and apply Apex control flow Statements.
      • Study Guides:
      • Notes:
        • Need to understand the difference between SOQL For Loops versus Standard SOQL Queries.
        • Standard SOQL Query can retrieve count as well number of sObject records.
        • SOQL For Loops always retrieve all sObjects using efficient chunking with calls to the query and queryMore methods of the SOAP API.
        • Developer should always use SOQL For Loop when handling with many records just to make sure they are not getting hit by the heap size limit.
        • Queries including an aggregate function don’t support queryMore.
        • SOQL For Loop can process records one at a time using a single sObject variable or in batches of 200 sObjects at a time using an sObject list. It is recommended to to go for batch option when you want to use DML statements within the for loop body.
        • Using inline SOQL query within SOQL For Loops can throw QueryException with the message “Aggregate query has too many rows for direct assignment, use For Loop”. This exception is thrown when accessing large number of child records(200 or more) of a retrieved sObject inside the For loop. To avoid such exception, we need to use a for loop to iterate over the child records and not to use inline SOQL query.
    • Describe how to write and when to use Apex classes and interfaces.
      • Study Guides:
      • Notes:
        • Inner class can’t have Static Variables. Only top-level class(outer class) variables can be declared static.
        • Inner class behaves like a static Java Inner class, but it doesn’t required the Static keyword. An inner class can have instance variables like an outer class, but there is no implicit pointer to an instance of the outer class(using the this keyword). So to access outer class variables inside inner class, you need to pass the reference of outer class to inner class by passing the this.
        • The private access modifier is the default.
        • The public access modifier means methods and variables can be used by any Apex in this application or namespace.
        • The global  access modifier means methods and variables can be used by any Apex that has access to the class, not just the apex code in the same application. If you are writing methods for SOAP API or if your method is going to be accessed by other Apex code, you should mark your method as global. global  methods can only be put inside a global class.
        • Methods and classes are final by default.
          • The virtual  keyword allows extension and override.
          • The override keyword must be used to override the base class.
        • Interface methods are always global.
        • Classes and Interfaces can be defined in triggers and anonymous block, bit only as local.
    • Describe how to use basic SOSL, SOQL, and DML statements when working with objects in Apex.
      • Study Guides:
      • Notes:
        • Upsert will either create the new record or update the existing record. It will find the existing record based on the specified field to match. If nothing mentioned, it will match based on the ID value.
        • Merge  will merge upto three records of the same sObject type into one of the record, deleting the others and reparenting any related records.
        • You can retrieve all the fields including ID field for one sObject record, but you can’t do that with DML statements. You need to write SOQL for that.
        • DML Limit: 150 statements per Apex transaction.
        • For upsert, you can select any field which is marked as External ID for Custom Object. For Standard Object, you can select any field which has idLookup property set to true. For example - Email field of Contact or user has idLookup property set to true. So you can use those fields in upsert operation to match the existing record.
        • For upsert, the logic -
          • If key is not matched, new record will be created.
          • If key is matched, existing record will be updated.
          • If key is matched with multiple records, an error is generated and the object is neither inserted nor updated.
        • Delete will delete the record and place it in recycle bin for 15 days.
      • DML Exception:
        • If a DML statement failed, it returns an exception of type DmlException.
      • DML Exception:
        • Database methods have an optional allOrNone parameter that allows you to specify whether the operation should partially succeed.
          • allOrNone = false: Successful records will be committed and errors will be returned for the failed records. Also, no exceptions are thrown here.
          • allOrNone = true: This is the default value. Database methods behave like DML statements and will throw an exception if a failure is encountered.
        • Database.insert() -> Database.SaveResult[]
        • Database.upsert() -> Database.UpsertResult[]
        • Database.delete() -> Database.DeleteResult[]
      • Should we use DML Statements or Database Methods?
        • Use DML Statements if you want any errors which may occur during bulk DML operation should be reported back as an Apex exception and as a developer, you can take control of the errors by using try-catch block and stop the execution immediately.
        • Use Database methods if you want to allow partial success of bulk DML operation i.e. even if few of records failed, you want rest of the records to go ahead and succeed. Using this approach, you can stop sending Apex exception and you as a developer take care of the failed record separately through code.
    • Describe the basic patterns used in triggers and classes to process data efficiently.
    • Describe when to use and how to write triggers.
      • Study Guides:
      • Notes:
        • If a trigger was invoked due to DML operation from Apex, any one error will make the entire operation rolls back. However, the runtime engine will still process every record in the operation context to compile a comprehensive list of errors.
        • If a trigger was invoked due to bulk DML call/operation, runtime engine sets aside the bad records and attempts to do a partial save of the records that did not generate errors.
        • If a trigger ever throws an unhandled exception, all the records are marked with an error and no further processing takes place.
        • Trigger.new and Trigger.old can’t be used the DML operations.
        • You can’t delete trigger.new
      • Trigger and Merge Statements:
        • Merge events do not fire their own trigger event. Rather they fire delete and update events -        
          • Delete Event: A Single merge operation fires a single delete event for all losing records.When a record is deleted after losing in the merge operation, MasterRecordId field is set to the ID of the winning record. The MasterRecordId field is only set in after delete context.  
          • Update Event: A single merge operation fires a single update event for the winning record only. Any child records that are reparented as a result of merge operation do not fire triggers.
          • Following is the order of events when a merge occurs:
            • The before delete trigger occurs.
            • The system deleted the necessary records due to merge, assign new parent records to the child records, and sets the MasterRecordId field on the deleted records.
            • The after delete trigger fires.
            • The system perform the updates required for the master record. Normal update trigger happens.
      • Triggers and Recovered Objects:
        • The after undelete trigger event only works with recovered objects - i.e. the records that were deleted and then recovered from the Recycle Bin through the undelete DML statements.
        • The after undelete trigger runs only on the top-level objects. For example, if you delete an Account, an Opportunity which is associated with that Account will also get deleted. Now if you undelete the same Account from Recycle Bin, the associated Opportunity records will also be undeleted. But undelete trigger will only execute for Account, not for Opportunity.
      • Order of Execution:
    • Describe the implications of governor limits on Apex transactions.
    • Describe the relationship between Apex transactions, the save execution order, and the potential for recursion and/or cascading
    • Describe how to implement exception handling in Apex
      • Study Guides:
      • Notes:
        • List of Built-In Exceptions -
          • DmlException: Any problem with DML statements like insert statement missing a required field.
          • ListException: Any problem with List such as attempting to access an index that is out of bounds.
          • NullPointerException: No need the explain. World Famous Exception.
          • QueryException: Any problem with SOQL Queries, such as assigning a query that returns no records or more than one record to a singleton sObject variable.
          • SObjectException: Any problem with sObject records, such as attempting to change a field in an update statement that can only be changed during insert.
        • Common Exception Methods -
          • getCause
          • getLineNumber
          • getMessage
          • getStackTraceString
          • getTypeName
          • getDmlFieldNames(Index of the failed record): Returns the name of the fields that caused the error for that particular record.
          • getDmlId(Index of the failed record): Returns the ID of the failed record.
          • getDmlMessage(Index of the failed record): Returns the error message for the specified failed record.
          • getNumDml: Returns number of failed records.
    • Describe how to write Visualforce Controller 
    • Describe when and how to use Standard Visualforce Controllers vs. Apex Custom Controllers and controller extensions.
    • Describe the programmatic techniques to prevent security vulnerabilities in Apex and Visualforce.
    • Describe how Apex impacts the ability to make declarative changes.
  4. User Interface [Weighting: 10% i.e. # of Questions: 6]
  5. Testing [Weighting: 12% i.e. # of Questions: ~8]
  6. Debug and Deployment Tools [Weighting: 10% i.e. # of Questions: 6]

  • Important Topics:
    • Apex Controller, Controller Extensions and Custom Controller
      • Custom Controller and Controller Extensions run in System Mode. In order to make sure that Custom Controller and Controller Extensions respects user’s owd, role hierarchy and sharing settings, you need to mark them with with sharing keyword.
      • If a Controller Extension extends a Standard Controller, the logic from Standard Controller will execute in User mode i.e. it will respect OWD, role hierarchy and sharing settings.
      • A Visualforce Page can have one Standard Controller, but more than one Controller Extension classes.
      • Controllers are attached to the page using any of the below three mutually exclusive formats -
        • Standard Controller
        • Standard Set/List Controller
        • Custom Controller
      • You can’t do -
        • DML Operation in Constructor or getter/setter methods
        • @future method call from Constructor or getter/setter methods.
    • Standard Set Controller
      • ApexPages.StandardController encapsulates a single object
      • ApexPages.StandardSetController contains a list of records (one or more), and has additional methods to support pagination and update multiple records at the same time.
      • Instantiate a StandardSetController in two ways -
      • From a list of sObjects:
                  List allAccounts = [SELECT ID, Name FROM Account LIMIT 200];
ApexPages.StandardSetController ctrl = new ApexPages.StandardSetController(allAccounts)

From Query Locator:
ApexPages.StandardSetController ctrl = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT ID, Name FROM Account]));
      • The maximum record limit for SetController is 10,000 records.
      • When Initializing a StandardSetController with Query Locator and if Query Locator is returning more than 10,000 records, LimitException will be thrown.
      • When Initializing a StandardSetController with list of sObjects and if the list contains more than 10,000 records, no exception will be thrown. Rather it will truncate the records to the limit.
    • Page Reference
      • PageReference is a reference to instantiate a page.
      • Use PageReference for -
        • To view and set query String parameters and their values for the page
        • To navigate to a difference page as a rest of an action method
      • You can instantiate a page in below different ways -
        • Page.existingPageName where existingPageName is the VF Page Name
        • PageReference pageRef = new PageReference(‘*** PARTIAL URL ***’); Here PARTIAL URL /apex/HelloWorld refers to https:///apex/HelloWorld.
        • PageReference pageRef = new PageReference(‘*** FULL URL ***’);
        • PageReference pageRef = new PageReference(‘https://www.sudipta-deb.blogspot.com’);
        • PageReference pageRef = ApexPages.currentPage();
      • To navigate to a new page, make setRedirect(true);
    • Components we can’t deploy with Metadata API:

I hope this post will provide you the guidance to clear Platform Developer - I. Provide me your feedbacks and please share with greater audience if you think it is helpful. Please let me know if you have any queries. 

Finally Wishing You BEST OF LUCK. 


Follow Me

Enter your email address:

Delivered by FeedBurner


Salesforce (105) Apex (47) admin (27) visualforce (21) ADM (20) dev 501 (19) integration (18) learn salesforce (18) 501 (16) lightning (16) javascript (14) SOAP (13) tutorial (11) Certification. (10) Kitchener Developer Group (8) Certification (7) Trigger (7) security (7) test class (7) unit testing (7) Advanced Admin (6) Advanced Apex (6) Sharing and Visibility (6) design pattern (6) developer (6) report (6) salesforce release (6) service cloud (6) trailhead (6) Lightning Experience (5) New Features (5) SOQL (5) css (5) dashboard (5) debug (5) formula (5) mobile (5) solution management (5) use case (5) JSON (4) Kitchener User Group (4) Lightning Web Component (4) Sales Cloud (4) Salesforce DX (4) Tips (4) WebSphere (4) best practice (4) cast iron (4) component (4) deployment (4) event (4) github (4) html (4) polymer (4) profiles (4) responsive (4) tdd (4) ui (4) visual studio code (4) Architect (3) Live Chat (3) Online Event (3) Opportunity (3) Performance (3) Products (3) REST (3) Role (3) Salesforce Certification (3) Scratch Org (3) Study Notes. (3) Summer15 (3) Web Technology (3) automation tool (3) dynamic apex (3) license (3) map (3) mapbox (3) release (3) singleton (3) version controlling (3) Asynchronous callout (2) Aura Framework (2) Bulkify (2) Community (2) Data Architecture and Management Certification (2) Devops (2) Distributed Version Controlling (2) ES6 (2) Eclipse (2) Einstein (2) Enterprise Territory Management (2) Financial Services Cloud (2) Force.com IDE (2) Governor Limit (2) Groups (2) IBM (2) Implicit Sharing (2) JourneyToCTA (2) LWC (2) Lightning Design System (2) Lightning Feature (2) Live Agent (2) Metadata (2) PD II (2) Price Book (2) SOSL (2) Sharing (2) Spring 15 (2) Summer17 (2) Territory (2) VS Code (2) Virtual Event (2) ant (2) basic (2) chatter (2) coding (2) communication (2) configuration (2) console (2) controller (2) documentation (2) dreamforce (2) flow (2) git (2) jquery (2) logging (2) object (2) permission (2) process builder (2) salesforce1 (2) strategy (2) xml (2) Action Plan (1) Action Plan Template (1) Activity Timeline (1) Advanced Currency (1) Agent Productivity (1) Analytics (1) Apex Sharing (1) AppExchange (1) Arrow (1) Article (1) Asynchronous Apex (1) Batch (1) Bots (1) Browser (1) Bulk data load (1) CTA (1) Calendar (1) Canon (1) Case Management (1) Celebration (1) Cheat Sheet (1) Classic (1) Compare (1) Confetti (1) Constructor (1) Contact Center (1) Continuation (1) Continuous Integration (1) Convert (1) Cookie (1) CumulusCI (1) Custom Metadata (1) Custom Object (1) Custom Permission (1) Customer (1) Dated Exchange Rate (1) Decorator Design Pattern (1) Dev Hub (1) Development (1) Diwali (1) EDA (1) ESLint (1) Education Cloud (1) Email (1) FSC (1) Function (1) Future (1) Global Gathering (1) Goals (1) Guest Access (1) Guest Profile (1) Guest User Sharing Rule (1) Guide (1) HEDA (1) Higher Education (1) Household (1) Husky (1) IDE (1) Ideas (1) Improvement (1) KPIs (1) Knowledge Management (1) Large Data Volume (1) LastModifiedDate (1) Manage Currencies (1) Manual Sharing (1) Metrics (1) Multi Currency (1) New (1) New Feature (1) OOPS (1) OWD (1) Omni-Channel (1) Partner (1) Permission Set (1) Person Account (1) Photo (1) Pipeline (1) Platform Developer I (1) Platform Developer II (1) Presentation (1) Prettier (1) Product Schedule (1) Profile (1) Promise (1) Prototype (1) Public Site (1) Query Plan (1) Queueable (1) QuickReference (1) Related records (1) Reports (1) Retrieve (1) Role Hierarchy (1) SAL (1) SFDX (1) Salesfor (1) Salesforce Advisor Link (1) Salesforce Labs (1) Salesforce Optimizer (1) SalesforceDx (1) Schedule (1) Session (1) Sharing Rule (1) Sharing Sets (1) Site (1) Skills (1) Snap-ins (1) Spring 17 (1) Spring 20 (1) Summer14 (1) Summer16 (1) Summer19 (1) Switch (1) SystemModStamp (1) Timeline (1) Unauthorized Access (1) User License (1) Users (1) Validation Rule (1) Web (1) Webservice (1) Winter'15 (1) Winter'17 (1) access (1) actionFunction (1) actionPoller (1) actionRegion (1) actionSupport (1) agile (1) app (1) approval process (1) aura (1) awesome (1) backup (1) bitbucket (1) book (1) campaign (1) change set (1) code (1) code coverage (1) csv (1) custom button (1) custom settings (1) customization (1) data loader (1) database (1) delegate Admin (1) describe (1) dom (1) duplicate (1) dynamic (1) equals (1) error (1) field-level security (1) folder (1) ftp (1) generic (1) gift (1) global describe (1) hashcode (1) import wizard (1) jenkins (1) keynote (1) long running requests (1) monitoring (1) mysql (1) page layout (1) personal (1) power of one (1) record type (1) relationship (1) request (1) review (1) sub-tab (1) tab (1) username (1) visual workflow (1) workflow (1)

Popular Posts

Total Subscribers

Total Pageviews

Contact Me


Email *

Message *