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.

In last blog COVID India Real Data In Lightning Community , I have given detail about showing live data of COVID19 patients. In this post, I will show that data in chart for all states. I have used chart.js for creating bar chart.  For creating chart using this library we need below four information. Numeric data in array which we need to show Labels in string array options or setting for chart type of chart. Chart can be bar, line etc. You can check type from chart.js site.  var lineChart = new Chart(ctx, {             type: ‘bar’, //point 4             data: {                 labels: this.stateNames, //point 2                 datasets: [{                     label: ‘States’,                     backgroundColor: this.colors,                     data: this.values, //point 1…

Read More

Many time we get requirement to uploading multiple files using lightning component. This post give detail about how to upload multiple files. Steps to complete this requirement Create Apex class which will save record in record as attachement Create Lightning Component to upload documents Add above created component in page to test it 1. Create Apex class to save record we need to create apex class to save selected files in record as attachment. Files which is uploaded first time will be created as attachment. Already uploaded files will be update with new contents. Apex Code: 2. Create Lightning Component…

Read More

Coronavirus disease (COVID-19) is an infectious disease caused by a newly discovered coronavirus.  World is danger due to this pandemic. More then 7 Million public is positive with this virus. This post will help in creating Lightning Community to show real time data of COVID virus patients in India.  To show real time data we need below steps API which will give real time data Consume above API in Salesforce Public Lightning Community Lightning Component to show data 1. Real time data API Real time data for COVID patients is available at https://api.covid19india.org/. You can also get information about patients at https://github.com/covid19india 2. Consume API…

Read More

Version Control is important for Team-Based Development for every organization.  We can use TFS or Git for versioning control. What is Git? Git is distrbuted version control system. Distributed version control systems give developers flexibility and freedom by providing every collaborator with a copy of the entire repository at any time, including all branches (lines of work) and commits (saved points in history) on a developer’s local machine. What is Github? Github is collaboration platform built on top of Git. GitHub serves as a community space where we can share our work, see our team’s work, complete code reviews, and…

Read More

In Lightning Web component, we can create component with and without HTML template. Component without HTML template is called Service Component or Service Libraries. Service Component can be created for reusable functions, which can be used in other LWC component. This post will explain how we can create Service Component which will be used in other component. This component has below functions. LOGO_URL – Which wll provide Logo Url for application showMessage – This function will show toast message. isValidForm – This function will check validity of each field on page validateEmail – This function will validate Email validateDOB -…

Read More

Salesforce.com Inc has hired Arundhati Bhattacharya, one of India’s best-known former bankers, as its India chief executive officer, a source with direct knowledge of the matter told Reuters on Tuesday. Arundhati Bhattacharya previously headed the State Bank of India (SBI), the country’s largest lender, and was the first woman to lead the more than 200-year-old bank. She retired from SBI in 2017 after spending four decades in various roles. “She is a hugely credible name who comes with a wealth of experience and will help Salesforce expand in India,” said the source, who is aware of the new appointment. Salesforce…

Read More

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