Posts

Showing posts from June, 2020

Salesforce LWC: Lightning Data Service - What, Why, When and Which?

Image
Today in this topic we will understand about Lightning Data Service in Lightning Web Component. At the end of this topic we will able to determine below points: What is Lightning Data Service? Why  to use Lightning Data Service? When  to use Lightning Data Service? Which Lightning Data Service to use? What is Lightning Data Service? From Salesforce Documentation- Lightning Data Service is centralised data caching framework, which is use to load, create, update and delete the data in Salesforce without Salesforce Server side Apex Code. Why to use Lightning Data Service? Below are the few reasons of using Lightning Data Service in Lightning Web Component: No need of additional apex code to get data by making additional server side call. Lightning Data Service supports Sharing Rule and Field Level Security. Because of not writing additional Apex Class code, it will improve component's performance. It cache the result locally on Client Side. It supports all standard and cus...

Salesforce LWC: Contact Card with Flip Functionality

Image
In this post we will learn how to use create contact cards with 180 degree flip functionality. Let us see the demo first to understand the scenario better:  User Scenario: We need an input lookup field where user can select any Account and once user select any account. It display all related Contact in Contact card format with Flip Functionality. Implementation: To implement this first we need lookup field where user can select any account. So for that we can use Lightning Data Service. By using lightning-edit-form we can show Account lookup. Once user will select Account, then using wire service we can get all related Contacts. Below is the HTML code which we need: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 <template> <div style= "background-color: white;" class= "slds-p-around_medium" > <lightning -tile label= "Contact Directory" type= "...

Followers