Author: Dhanik Lal Sahni

Dhanik Lal Sahni is a Salesforce Solution Architect, Independent Consultant, and the founder of SalesforceCodex.com. With nearly two decades of IT experience and extensive expertise in Salesforce architecture, he helps startups and enterprises design scalable, secure, and high-performance CRM solutions using Sales Cloud, Service Cloud, Experience Cloud, Data Cloud, Apex, Lightning Web Components (LWC), and enterprise integration patterns. Through SalesforceCodex, he shares practical tutorials, real-world implementation guides, enterprise architecture best practices, and interview preparation resources for Salesforce Developers, Architects, and Administrators. Learn more about his Salesforce consulting and freelance services at dhaniksahni.com.

75% Test coverage for Salesforce application is very important. Without 75% code coverage we can not move code in production. This post will help in resolving test classes coverage issue for dependent classes. Dependent classes create issue while test class coverage.  We should utilize mocking framework for completing test coverage. Let us take example we have below class for AccountService which will notify when new account is created.  As notification can be different based on condition, notification object will be created dynamically. We have two important piece of code to for test coverage INotification interface and its class test coverage…

Read More

Worlds number 1 CRM and Marketing Technology company has acquired The CMO Club . The CMO Club is member based Content Marketing and Media company. They are the world’s most innovative and engaged community of CMOs, committed to helping each other. Stephanie Buscemi, CMO of Salesforce announced this latest Salesforce acquisition through an official blog. Stephanie said, Today I am excited to announce that Salesforce has acquired The CMO Club. She also added that founder and CEO Pete Krainik and the entire The CMO Club community would join the Salesforce family. Stephanie added, “The CMO Club is the world’s most innovative and engaged member-based community…

Read More

I am using the Google Fit Android app for my daily fitness activity monitoring.  Based on this, I thought of integrating Google Fitbit with Salesforce.   This blog will give step by step process of integrating Google Fitbit/Fit with Salesforce. This complete integration requires the below step Get an Access Token from Google to call Google Fit API Get activities using the authentication token in Apex and Lightning Component Show activities in Line Chart 1. Get an Access Token from Google to call Google Fit API Please refer blog http://salesforcecodex.com/2020/02/integrating-google-api-with-salesforce/ to get an access token for Google Fit API. 2. Get activities…

Read More

Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on Salesforce servers in conjunction with calls to the API. Below are some of important questions. You can also check below question posts for interview questions. Salesforce Interview Question – Security Top 20 Salesforce Interview Question – Integration What is difference between custom controller and controller extension? Ans. custom controller: Custom controller is required when standard controller is not fitting a requirement Like if you need to some custom validation or some external system call. We have to implements all of the…

Read More

Salesforce has announced to buy Vlocity, a San Francisco-based cloud and mobile software provider, for approximately $1.33B. Vlocity is a leading provider of industry-specific cloud and mobile software, driving digital transformation for the world’s largest companies. A three-time Forbes Cloud 100 Winner (2017 – 2019), Vlocity, is an industry cloud app pioneer built in partnership with Salesforce®, the world’s #1 CRM provider, that increases agility, operational efficiency and simplicity, at a lower cost of ownership for the enterprise. The transaction is expected to be finalized in the second quarter of fiscal 2021, subject to regulatory approvals. David Schmaier, CEO and founder of Vlocity,…

Read More

Salesforce Spring ’20 Release Features Now Available This release includes about 300 innovations, including some new products like below: Sustainability Cloud Salesforce Sustainability Cloud, a carbon accounting product for businesses to drive climate action, is now generally available. With Salesforce Sustainability Cloud, businesses now have a trusted sustainability platform that gives them a 360-degree view of their environmental impact and provides data-driven insights that will accelerate the world’s efforts towards carbon neutrality. Marketing Audience Studio: Marketing Audience Studio is a new product that enables customers improve the reach of email campaigns Einstein Analytics for Consumer Goods – Einstein Analytics for Consumer…

Read More

Apex code is mostly run in system context so it is not considering current user’s permission. It is creating data integrity issue. Using  with sharing keywords when declaring a class enforces Sharing Rules, but not object and field-level permissions. In Spring 20 release some security enhancements are added to enforce object and field-level permissions. Using Schema Methods We can now use Schema.DescribeFieldResult to check current user has read, create, or update access for a field. For example, if we want to check that logged user has read access on PersonEmail field of the Account Object, we can enclose the SOQL query inside an if block that…

Read More