Author: Dhanik Lal Sahni

With over 18 years of experience in web-based application development, I specialize in Salesforce technology and its ecosystem. My journey has equipped me with expertise in a diverse range of technologies including .NET, .NET Core, MS Dynamics CRM, Azure, Oracle, and SQL Server. I am dedicated to staying at the forefront of technological advancements and continuously researching new developments in the Salesforce realm. My focus remains on leveraging technology to create innovative solutions that drive business success.

Recently my team got requirement to send report as email attachment to external users.  This blog will show number of ways we can send report as attachment in email. We can send report to our internal user using standard schedule report but we can not schedule to send email to external user. Here are some options which can be used to solve this requirement. Create attachment using SOQL and add data as attachment Create attachment using Apex from standard report Create user and send to that user email Create attachment using SOQL and add data as attachment  We can create…

Read More

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